ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/configure
(Generate patch)

Comparing trunk/configure (file contents):
Revision 44 by gezelter, Wed Oct 6 21:22:43 2004 UTC vs.
Revision 1396 by gezelter, Sat Dec 5 02:57:05 2009 UTC

# Line 1 | Line 1
1   #! /bin/sh
2   # Guess values for system-dependent variables and create Makefiles.
3 < # Generated by GNU Autoconf 2.59 for OOPSE 2.0.
3 > # Generated by GNU Autoconf 2.65 for OpenMD 1.0.
4   #
5   # Report bugs to <gezelter@nd.edu>.
6   #
7 < # Copyright (C) 2003 Free Software Foundation, Inc.
7 > #
8 > # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9 > # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
10 > # Inc.
11 > #
12 > #
13   # This configure script is free software; the Free Software Foundation
14   # gives unlimited permission to copy, distribute and modify it.
15 < ## --------------------- ##
16 < ## M4sh Initialization.  ##
17 < ## --------------------- ##
15 > ## -------------------- ##
16 > ## M4sh Initialization. ##
17 > ## -------------------- ##
18  
19 < # Be Bourne compatible
20 < if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 > # Be more Bourne compatible
20 > DUALCASE=1; export DUALCASE # for MKS sh
21 > if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22    emulate sh
23    NULLCMD=:
24 <  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24 >  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25    # is contrary to our usage.  Disable this feature.
26    alias -g '${1+"$@"}'='"$@"'
27 < elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28 <  set -o posix
27 >  setopt NO_GLOB_SUBST
28 > else
29 >  case `(set -o) 2>/dev/null` in #(
30 >  *posix*) :
31 >    set -o posix ;; #(
32 >  *) :
33 >     ;;
34 > esac
35   fi
24 DUALCASE=1; export DUALCASE # for MKS sh
36  
37 < # Support unset when possible.
38 < if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
39 <  as_unset=unset
37 >
38 > as_nl='
39 > '
40 > export as_nl
41 > # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 > as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 > as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 > as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 > # Prefer a ksh shell builtin over an external printf program on Solaris,
46 > # but without wasting forks for bash or zsh.
47 > if test -z "$BASH_VERSION$ZSH_VERSION" \
48 >    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 >  as_echo='print -r --'
50 >  as_echo_n='print -rn --'
51 > elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 >  as_echo='printf %s\n'
53 >  as_echo_n='printf %s'
54   else
55 <  as_unset=false
55 >  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 >    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 >    as_echo_n='/usr/ucb/echo -n'
58 >  else
59 >    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 >    as_echo_n_body='eval
61 >      arg=$1;
62 >      case $arg in #(
63 >      *"$as_nl"*)
64 >        expr "X$arg" : "X\\(.*\\)$as_nl";
65 >        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 >      esac;
67 >      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 >    '
69 >    export as_echo_n_body
70 >    as_echo_n='sh -c $as_echo_n_body as_echo'
71 >  fi
72 >  export as_echo_body
73 >  as_echo='sh -c $as_echo_body as_echo'
74   fi
75  
76 + # The user is always right.
77 + if test "${PATH_SEPARATOR+set}" != set; then
78 +  PATH_SEPARATOR=:
79 +  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 +    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 +      PATH_SEPARATOR=';'
82 +  }
83 + fi
84  
85 < # Work around bugs in pre-3.0 UWIN ksh.
86 < $as_unset ENV MAIL MAILPATH
85 >
86 > # IFS
87 > # We need space, tab and new line, in precisely that order.  Quoting is
88 > # there to prevent editors from complaining about space-tab.
89 > # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 > # splitting by setting IFS to empty value.)
91 > IFS=" ""        $as_nl"
92 >
93 > # Find who we are.  Look in the path if we contain no directory separator.
94 > case $0 in #((
95 >  *[\\/]* ) as_myself=$0 ;;
96 >  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97 > for as_dir in $PATH
98 > do
99 >  IFS=$as_save_IFS
100 >  test -z "$as_dir" && as_dir=.
101 >    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 >  done
103 > IFS=$as_save_IFS
104 >
105 >     ;;
106 > esac
107 > # We did not find ourselves, most probably we were run as `sh COMMAND'
108 > # in which case we are not to be found in the path.
109 > if test "x$as_myself" = x; then
110 >  as_myself=$0
111 > fi
112 > if test ! -f "$as_myself"; then
113 >  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 >  exit 1
115 > fi
116 >
117 > # Unset variables that we do not need and which cause bugs (e.g. in
118 > # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119 > # suppresses any "Segmentation fault" message there.  '((' could
120 > # trigger a bug in pdksh 5.2.14.
121 > for as_var in BASH_ENV ENV MAIL MAILPATH
122 > do eval test x\${$as_var+set} = xset \
123 >  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124 > done
125   PS1='$ '
126   PS2='> '
127   PS4='+ '
128  
129   # NLS nuisances.
130 < for as_var in \
131 <  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
132 <  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
133 <  LC_TELEPHONE LC_TIME
130 > LC_ALL=C
131 > export LC_ALL
132 > LANGUAGE=C
133 > export LANGUAGE
134 >
135 > # CDPATH.
136 > (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137 >
138 > if test "x$CONFIG_SHELL" = x; then
139 >  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140 >  emulate sh
141 >  NULLCMD=:
142 >  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143 >  # is contrary to our usage.  Disable this feature.
144 >  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145 >  setopt NO_GLOB_SUBST
146 > else
147 >  case \`(set -o) 2>/dev/null\` in #(
148 >  *posix*) :
149 >    set -o posix ;; #(
150 >  *) :
151 >     ;;
152 > esac
153 > fi
154 > "
155 >  as_required="as_fn_return () { (exit \$1); }
156 > as_fn_success () { as_fn_return 0; }
157 > as_fn_failure () { as_fn_return 1; }
158 > as_fn_ret_success () { return 0; }
159 > as_fn_ret_failure () { return 1; }
160 >
161 > exitcode=0
162 > as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163 > as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164 > as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165 > as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166 > if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167 >
168 > else
169 >  exitcode=1; echo positional parameters were not saved.
170 > fi
171 > test x\$exitcode = x0 || exit 1"
172 >  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173 >  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174 >  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175 >  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176 > test \$(( 1 + 1 )) = 2 || exit 1"
177 >  if (eval "$as_required") 2>/dev/null; then :
178 >  as_have_required=yes
179 > else
180 >  as_have_required=no
181 > fi
182 >  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183 >
184 > else
185 >  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186 > as_found=false
187 > for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188   do
189 <  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
190 <    eval $as_var=C; export $as_var
189 >  IFS=$as_save_IFS
190 >  test -z "$as_dir" && as_dir=.
191 >  as_found=:
192 >  case $as_dir in #(
193 >         /*)
194 >           for as_base in sh bash ksh sh5; do
195 >             # Try only shells that exist, to save several forks.
196 >             as_shell=$as_dir/$as_base
197 >             if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198 >                    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 >  CONFIG_SHELL=$as_shell as_have_required=yes
200 >                   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 >  break 2
202 > fi
203 > fi
204 >           done;;
205 >       esac
206 >  as_found=false
207 > done
208 > $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209 >              { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210 >  CONFIG_SHELL=$SHELL as_have_required=yes
211 > fi; }
212 > IFS=$as_save_IFS
213 >
214 >
215 >      if test "x$CONFIG_SHELL" != x; then :
216 >  # We cannot yet assume a decent shell, so we have to provide a
217 >        # neutralization value for shells without unset; and this also
218 >        # works around shells that cannot unset nonexistent variables.
219 >        BASH_ENV=/dev/null
220 >        ENV=/dev/null
221 >        (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222 >        export CONFIG_SHELL
223 >        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224 > fi
225 >
226 >    if test x$as_have_required = xno; then :
227 >  $as_echo "$0: This script requires a shell more modern than all"
228 >  $as_echo "$0: the shells that I found on your system."
229 >  if test x${ZSH_VERSION+set} = xset ; then
230 >    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231 >    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232    else
233 <    $as_unset $as_var
233 >    $as_echo "$0: Please tell bug-autoconf@gnu.org and gezelter@nd.edu
234 > $0: about your system, including any error possibly output
235 > $0: before this message. Then install a modern shell, or
236 > $0: manually run the script under such a shell if you do
237 > $0: have one."
238    fi
239 < done
239 >  exit 1
240 > fi
241 > fi
242 > fi
243 > SHELL=${CONFIG_SHELL-/bin/sh}
244 > export SHELL
245 > # Unset more variables known to interfere with behavior of common tools.
246 > CLICOLOR_FORCE= GREP_OPTIONS=
247 > unset CLICOLOR_FORCE GREP_OPTIONS
248  
249 < # Required to use basename.
250 < if expr a : '\(a\)' >/dev/null 2>&1; then
249 > ## --------------------- ##
250 > ## M4sh Shell Functions. ##
251 > ## --------------------- ##
252 > # as_fn_unset VAR
253 > # ---------------
254 > # Portably unset VAR.
255 > as_fn_unset ()
256 > {
257 >  { eval $1=; unset $1;}
258 > }
259 > as_unset=as_fn_unset
260 >
261 > # as_fn_set_status STATUS
262 > # -----------------------
263 > # Set $? to STATUS, without forking.
264 > as_fn_set_status ()
265 > {
266 >  return $1
267 > } # as_fn_set_status
268 >
269 > # as_fn_exit STATUS
270 > # -----------------
271 > # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272 > as_fn_exit ()
273 > {
274 >  set +e
275 >  as_fn_set_status $1
276 >  exit $1
277 > } # as_fn_exit
278 >
279 > # as_fn_mkdir_p
280 > # -------------
281 > # Create "$as_dir" as a directory, including parents if necessary.
282 > as_fn_mkdir_p ()
283 > {
284 >
285 >  case $as_dir in #(
286 >  -*) as_dir=./$as_dir;;
287 >  esac
288 >  test -d "$as_dir" || eval $as_mkdir_p || {
289 >    as_dirs=
290 >    while :; do
291 >      case $as_dir in #(
292 >      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293 >      *) as_qdir=$as_dir;;
294 >      esac
295 >      as_dirs="'$as_qdir' $as_dirs"
296 >      as_dir=`$as_dirname -- "$as_dir" ||
297 > $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298 >         X"$as_dir" : 'X\(//\)[^/]' \| \
299 >         X"$as_dir" : 'X\(//\)$' \| \
300 >         X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301 > $as_echo X"$as_dir" |
302 >    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303 >            s//\1/
304 >            q
305 >          }
306 >          /^X\(\/\/\)[^/].*/{
307 >            s//\1/
308 >            q
309 >          }
310 >          /^X\(\/\/\)$/{
311 >            s//\1/
312 >            q
313 >          }
314 >          /^X\(\/\).*/{
315 >            s//\1/
316 >            q
317 >          }
318 >          s/.*/./; q'`
319 >      test -d "$as_dir" && break
320 >    done
321 >    test -z "$as_dirs" || eval "mkdir $as_dirs"
322 >  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
323 >
324 >
325 > } # as_fn_mkdir_p
326 > # as_fn_append VAR VALUE
327 > # ----------------------
328 > # Append the text in VALUE to the end of the definition contained in VAR. Take
329 > # advantage of any shell optimizations that allow amortized linear growth over
330 > # repeated appends, instead of the typical quadratic growth present in naive
331 > # implementations.
332 > if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333 >  eval 'as_fn_append ()
334 >  {
335 >    eval $1+=\$2
336 >  }'
337 > else
338 >  as_fn_append ()
339 >  {
340 >    eval $1=\$$1\$2
341 >  }
342 > fi # as_fn_append
343 >
344 > # as_fn_arith ARG...
345 > # ------------------
346 > # Perform arithmetic evaluation on the ARGs, and store the result in the
347 > # global $as_val. Take advantage of shells that can avoid forks. The arguments
348 > # must be portable across $(()) and expr.
349 > if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350 >  eval 'as_fn_arith ()
351 >  {
352 >    as_val=$(( $* ))
353 >  }'
354 > else
355 >  as_fn_arith ()
356 >  {
357 >    as_val=`expr "$@" || test $? -eq 1`
358 >  }
359 > fi # as_fn_arith
360 >
361 >
362 > # as_fn_error ERROR [LINENO LOG_FD]
363 > # ---------------------------------
364 > # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365 > # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366 > # script with status $?, using 1 if that was 0.
367 > as_fn_error ()
368 > {
369 >  as_status=$?; test $as_status -eq 0 && as_status=1
370 >  if test "$3"; then
371 >    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372 >    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
373 >  fi
374 >  $as_echo "$as_me: error: $1" >&2
375 >  as_fn_exit $as_status
376 > } # as_fn_error
377 >
378 > if expr a : '\(a\)' >/dev/null 2>&1 &&
379 >   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380    as_expr=expr
381   else
382    as_expr=false
383   fi
384  
385 < if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
385 > if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386    as_basename=basename
387   else
388    as_basename=false
389   fi
390  
391 + if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392 +  as_dirname=dirname
393 + else
394 +  as_dirname=false
395 + fi
396  
397 < # Name of the executable.
68 < as_me=`$as_basename "$0" ||
397 > as_me=`$as_basename -- "$0" ||
398   $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399           X"$0" : 'X\(//\)$' \| \
400 <         X"$0" : 'X\(/\)$' \| \
401 <         .     : '\(.\)' 2>/dev/null ||
402 < echo X/"$0" |
403 <    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
404 <          /^X\/\(\/\/\)$/{ s//\1/; q; }
405 <          /^X\/\(\/\).*/{ s//\1/; q; }
406 <          s/.*/./; q'`
400 >         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401 > $as_echo X/"$0" |
402 >    sed '/^.*\/\([^/][^/]*\)\/*$/{
403 >            s//\1/
404 >            q
405 >          }
406 >          /^X\/\(\/\/\)$/{
407 >            s//\1/
408 >            q
409 >          }
410 >          /^X\/\(\/\).*/{
411 >            s//\1/
412 >            q
413 >          }
414 >          s/.*/./; q'`
415  
79
80 # PATH needs CR, and LINENO needs CR and PATH.
416   # Avoid depending upon Character Ranges.
417   as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418   as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
# Line 85 | Line 420 | as_cr_alnum=$as_cr_Letters$as_cr_digits
420   as_cr_digits='0123456789'
421   as_cr_alnum=$as_cr_Letters$as_cr_digits
422  
88 # The user is always right.
89 if test "${PATH_SEPARATOR+set}" != set; then
90  echo "#! /bin/sh" >conf$$.sh
91  echo  "exit 0"   >>conf$$.sh
92  chmod +x conf$$.sh
93  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
94    PATH_SEPARATOR=';'
95  else
96    PATH_SEPARATOR=:
97  fi
98  rm -f conf$$.sh
99 fi
423  
424 <
425 <  as_lineno_1=$LINENO
426 <  as_lineno_2=$LINENO
427 <  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
428 <  test "x$as_lineno_1" != "x$as_lineno_2" &&
429 <  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
430 <  # Find who we are.  Look in the path if we contain no path at all
431 <  # relative or not.
432 <  case $0 in
110 <    *[\\/]* ) as_myself=$0 ;;
111 <    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
112 < for as_dir in $PATH
113 < do
114 <  IFS=$as_save_IFS
115 <  test -z "$as_dir" && as_dir=.
116 <  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
117 < done
118 <
119 <       ;;
120 <  esac
121 <  # We did not find ourselves, most probably we were run as `sh COMMAND'
122 <  # in which case we are not to be found in the path.
123 <  if test "x$as_myself" = x; then
124 <    as_myself=$0
125 <  fi
126 <  if test ! -f "$as_myself"; then
127 <    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
128 <   { (exit 1); exit 1; }; }
129 <  fi
130 <  case $CONFIG_SHELL in
131 <  '')
132 <    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
133 < for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
134 < do
135 <  IFS=$as_save_IFS
136 <  test -z "$as_dir" && as_dir=.
137 <  for as_base in sh bash ksh sh5; do
138 <         case $as_dir in
139 <         /*)
140 <           if ("$as_dir/$as_base" -c '
141 <  as_lineno_1=$LINENO
142 <  as_lineno_2=$LINENO
143 <  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
144 <  test "x$as_lineno_1" != "x$as_lineno_2" &&
145 <  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
146 <             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
147 <             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
148 <             CONFIG_SHELL=$as_dir/$as_base
149 <             export CONFIG_SHELL
150 <             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
151 <           fi;;
152 <         esac
153 <       done
154 < done
155 < ;;
156 <  esac
157 <
158 <  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
159 <  # uniformly replaced by the line number.  The first 'sed' inserts a
160 <  # line-number line before each line; the second 'sed' does the real
161 <  # work.  The second script uses 'N' to pair each line-number line
162 <  # with the numbered line, and appends trailing '-' during
163 <  # substitution so that $LINENO is not a special case at line end.
164 <  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
165 <  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
166 <  sed '=' <$as_myself |
424 >  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425 >  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426 >  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427 >  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428 >  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429 >  sed -n '
430 >    p
431 >    /[$]LINENO/=
432 >  ' <$as_myself |
433      sed '
434 +      s/[$]LINENO.*/&-/
435 +      t lineno
436 +      b
437 +      :lineno
438        N
439 <      s,$,-,
440 <      : loop
171 <      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
439 >      :loop
440 >      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441        t loop
442 <      s,-$,,
174 <      s,^['$as_cr_digits']*\n,,
442 >      s/-\n.*//
443      ' >$as_me.lineno &&
444 <  chmod +x $as_me.lineno ||
445 <    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
178 <   { (exit 1); exit 1; }; }
444 >  chmod +x "$as_me.lineno" ||
445 >    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446  
447    # Don't try to exec as it changes $[0], causing all sort of problems
448    # (the dirname of $[0] is not the place where we might find the
449 <  # original and so on.  Autoconf is especially sensible to this).
450 <  . ./$as_me.lineno
449 >  # original and so on.  Autoconf is especially sensitive to this).
450 >  . "./$as_me.lineno"
451    # Exit status is that of the last command.
452    exit
453   }
454  
455 <
456 < case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
457 <  *c*,-n*) ECHO_N= ECHO_C='
458 < ' ECHO_T='      ' ;;
459 <  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
460 <  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
461 < esac
462 <
463 < if expr a : '\(a\)' >/dev/null 2>&1; then
464 <  as_expr=expr
465 < else
466 <  as_expr=false
200 < fi
455 > ECHO_C= ECHO_N= ECHO_T=
456 > case `echo -n x` in #(((((
457 > -n*)
458 >  case `echo 'xy\c'` in
459 >  *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
460 >  xy)  ECHO_C='\c';;
461 >  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462 >       ECHO_T=' ';;
463 >  esac;;
464 > *)
465 >  ECHO_N='-n';;
466 > esac
467  
468   rm -f conf$$ conf$$.exe conf$$.file
469 < echo >conf$$.file
470 < if ln -s conf$$.file conf$$ 2>/dev/null; then
471 <  # We could just check for DJGPP; but this test a) works b) is more generic
472 <  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
473 <  if test -f conf$$.exe; then
474 <    # Don't use ln at all; we don't have any links
475 <    as_ln_s='cp -p'
476 <  else
469 > if test -d conf$$.dir; then
470 >  rm -f conf$$.dir/conf$$.file
471 > else
472 >  rm -f conf$$.dir
473 >  mkdir conf$$.dir 2>/dev/null
474 > fi
475 > if (echo >conf$$.file) 2>/dev/null; then
476 >  if ln -s conf$$.file conf$$ 2>/dev/null; then
477      as_ln_s='ln -s'
478 +    # ... but there are two gotchas:
479 +    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480 +    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481 +    # In both cases, we have to default to `cp -p'.
482 +    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483 +      as_ln_s='cp -p'
484 +  elif ln conf$$.file conf$$ 2>/dev/null; then
485 +    as_ln_s=ln
486 +  else
487 +    as_ln_s='cp -p'
488    fi
213 elif ln conf$$.file conf$$ 2>/dev/null; then
214  as_ln_s=ln
489   else
490    as_ln_s='cp -p'
491   fi
492 < rm -f conf$$ conf$$.exe conf$$.file
492 > rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493 > rmdir conf$$.dir 2>/dev/null
494  
495   if mkdir -p . 2>/dev/null; then
496 <  as_mkdir_p=:
496 >  as_mkdir_p='mkdir -p "$as_dir"'
497   else
498    test -d ./-p && rmdir ./-p
499    as_mkdir_p=false
500   fi
501  
502 < as_executable_p="test -f"
502 > if test -x / >/dev/null 2>&1; then
503 >  as_test_x='test -x'
504 > else
505 >  if ls -dL / >/dev/null 2>&1; then
506 >    as_ls_L_option=L
507 >  else
508 >    as_ls_L_option=
509 >  fi
510 >  as_test_x='
511 >    eval sh -c '\''
512 >      if test -d "$1"; then
513 >        test -d "$1/.";
514 >      else
515 >        case $1 in #(
516 >        -*)set "./$1";;
517 >        esac;
518 >        case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519 >        ???[sx]*):;;*)false;;esac;fi
520 >    '\'' sh
521 >  '
522 > fi
523 > as_executable_p=$as_test_x
524  
525   # Sed expression to map a string onto a valid CPP name.
526   as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Line 233 | Line 529 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
529   as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530  
531  
532 < # IFS
533 < # We need space, tab and new line, in precisely that order.
238 < as_nl='
239 < '
240 < IFS="   $as_nl"
532 > test -n "$DJDIR" || exec 7<&0 </dev/null
533 > exec 6>&1
534  
242 # CDPATH.
243 $as_unset CDPATH
244
245
535   # Name of the host.
536   # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
537   # so uname gets run too.
538   ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539  
251 exec 6>&1
252
540   #
541   # Initializations.
542   #
543   ac_default_prefix=/usr/local
544 + ac_clean_files=
545   ac_config_libobj_dir=.
546 + LIBOBJS=
547   cross_compiling=no
548   subdirs=
549   MFLAGS=
550   MAKEFLAGS=
262 SHELL=${CONFIG_SHELL-/bin/sh}
551  
264 # Maximum number of lines to put in a shell here document.
265 # This variable seems obsolete.  It should probably be removed, and
266 # only ac_max_sed_lines should be used.
267 : ${ac_max_here_lines=38}
268
552   # Identity of this package.
553 < PACKAGE_NAME='OOPSE'
554 < PACKAGE_TARNAME='oopse'
555 < PACKAGE_VERSION='2.0'
556 < PACKAGE_STRING='OOPSE 2.0'
553 > PACKAGE_NAME='OpenMD'
554 > PACKAGE_TARNAME='openmd'
555 > PACKAGE_VERSION='1.0'
556 > PACKAGE_STRING='OpenMD 1.0'
557   PACKAGE_BUGREPORT='gezelter@nd.edu'
558 + PACKAGE_URL=''
559  
560 < ac_unique_file="src/applications/oopse/oopse.cpp"
560 > ac_unique_file="src/applications/openmd/openmd.cpp"
561   ac_default_prefix="/usr/local"
562   # Factoring default headers for most tests.
563   ac_includes_default="\
564   #include <stdio.h>
565 < #if HAVE_SYS_TYPES_H
565 > #ifdef HAVE_SYS_TYPES_H
566   # include <sys/types.h>
567   #endif
568 < #if HAVE_SYS_STAT_H
568 > #ifdef HAVE_SYS_STAT_H
569   # include <sys/stat.h>
570   #endif
571 < #if STDC_HEADERS
571 > #ifdef STDC_HEADERS
572   # include <stdlib.h>
573   # include <stddef.h>
574   #else
575 < # if HAVE_STDLIB_H
575 > # ifdef HAVE_STDLIB_H
576   #  include <stdlib.h>
577   # endif
578   #endif
579 < #if HAVE_STRING_H
580 < # if !STDC_HEADERS && HAVE_MEMORY_H
579 > #ifdef HAVE_STRING_H
580 > # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
581   #  include <memory.h>
582   # endif
583   # include <string.h>
584   #endif
585 < #if HAVE_STRINGS_H
585 > #ifdef HAVE_STRINGS_H
586   # include <strings.h>
587   #endif
588 < #if HAVE_INTTYPES_H
588 > #ifdef HAVE_INTTYPES_H
589   # include <inttypes.h>
306 #else
307 # if HAVE_STDINT_H
308 #  include <stdint.h>
309 # endif
590   #endif
591 < #if HAVE_UNISTD_H
591 > #ifdef HAVE_STDINT_H
592 > # include <stdint.h>
593 > #endif
594 > #ifdef HAVE_UNISTD_H
595   # include <unistd.h>
596   #endif"
597  
598 < ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PROGNAME debug build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX OOPSE_TEMPLATE_FLAGS EXTRA_CC_FLAG F90 F90FLAGS ac_ct_F90 PREPFLAG PREPDEFFLAG F90LIBS F90_FUNC F90_FUNC_ MOD F90_WORK_FILES_ARG MODDIRFLAG F90MODINCSPEC F90_MODULE_NAMES CPP EGREP LIBOBJS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE RANLIB ac_ct_RANLIB YACC LEX LEXLIB LEX_OUTPUT_ROOT AR MPI_LIB_DIR MPI_INC_DIR MPI_F90_INC MPI_LIB MPI_F90_LIB USE_MPI SPRNG_LIB_DIR SPRNG_INC_DIR SPRNG_LIB USE_SPRNG MKL_LIBDIR MKL_LIB MKL_INC HAVE_MKL BATEXT MKINSTALLDIRS OOPSE OOPSE_HOME SUBDIRS FFLAGS LTLIBOBJS'
598 > ac_subst_vars='LTLIBOBJS
599 > SUBDIRS
600 > OPENMD_HOME
601 > OPENMD
602 > MKINSTALLDIRS
603 > BATEXT
604 > enable_latex_docs
605 > enable_html_docs
606 > enable_dot
607 > DOC
608 > DOT
609 > DOXYGEN
610 > POW_LIB
611 > LIBOBJS
612 > USE_OPENBABEL
613 > OPENBABEL_LIB
614 > OPENBABEL_LIB_DIR
615 > OPENBABEL_INC_DIR
616 > CXXCPP
617 > USE_QHULL
618 > QHULL
619 > QHULL_LIB_DIR
620 > QHULL_INC_DIR
621 > FFTW_LIBS
622 > FFTW_LIB_DIR
623 > FFTW_INC_DIR
624 > ZLIB
625 > ZLIB_LIB_DIR
626 > ZLIB_INC_DIR
627 > F90_MODULE_NAMES
628 > F90MODINCSPEC
629 > MODDIRFLAG
630 > F90_WORK_FILES_ARG
631 > MOD
632 > FC_FUNC_
633 > FC_FUNC
634 > FCLIBS
635 > PREPDEFFLAG
636 > FCFLAGS_SRCEXT
637 > FCFLAGS_F90
638 > PS
639 > AR
640 > INSTALL_DATA
641 > INSTALL_SCRIPT
642 > INSTALL_PROGRAM
643 > PERL_SHEBANG
644 > PERLINTERP
645 > RANLIB
646 > SET_MAKE
647 > LN_S
648 > EGREP
649 > GREP
650 > CPP
651 > USE_MPI
652 > MPIFC
653 > MPICC
654 > MPILIBS
655 > MPICXX
656 > ac_ct_FC
657 > FCFLAGS
658 > FC
659 > ac_ct_CC
660 > CFLAGS
661 > CC
662 > OBJEXT
663 > EXEEXT
664 > ac_ct_CXX
665 > CPPFLAGS
666 > LDFLAGS
667 > CXXFLAGS
668 > CXX
669 > USE_SINGLE_PRECISION
670 > debug
671 > PROGNAME
672 > host_os
673 > host_vendor
674 > host_cpu
675 > host
676 > build_os
677 > build_vendor
678 > build_cpu
679 > build
680 > target_alias
681 > host_alias
682 > build_alias
683 > LIBS
684 > ECHO_T
685 > ECHO_N
686 > ECHO_C
687 > DEFS
688 > mandir
689 > localedir
690 > libdir
691 > psdir
692 > pdfdir
693 > dvidir
694 > htmldir
695 > infodir
696 > docdir
697 > oldincludedir
698 > includedir
699 > localstatedir
700 > sharedstatedir
701 > sysconfdir
702 > datadir
703 > datarootdir
704 > libexecdir
705 > sbindir
706 > bindir
707 > program_transform_name
708 > prefix
709 > exec_prefix
710 > PACKAGE_URL
711 > PACKAGE_BUGREPORT
712 > PACKAGE_STRING
713 > PACKAGE_VERSION
714 > PACKAGE_TARNAME
715 > PACKAGE_NAME
716 > PATH_SEPARATOR
717 > SHELL'
718   ac_subst_files=''
719 + ac_user_opts='
720 + enable_option_checking
721 + enable_openmd_home
722 + enable_debug
723 + enable_single
724 + enable_float
725 + with_perl_shebang
726 + with_zlib
727 + with_fftw
728 + with_qhull
729 + with_openbabel
730 + enable_doxygen
731 + enable_dot
732 + enable_html_docs
733 + enable_latex_docs
734 + '
735 +      ac_precious_vars='build_alias
736 + host_alias
737 + target_alias
738 + CXX
739 + CXXFLAGS
740 + LDFLAGS
741 + LIBS
742 + CPPFLAGS
743 + CCC
744 + CC
745 + CFLAGS
746 + FC
747 + FCFLAGS
748 + MPICXX
749 + MPICC
750 + MPIFC
751 + CPP
752 + CXXCPP'
753  
754 +
755   # Initialize some variables set by options.
756   ac_init_help=
757   ac_init_version=false
758 + ac_unrecognized_opts=
759 + ac_unrecognized_sep=
760   # The variables have the same names as the options, with
761   # dashes changed to underlines.
762   cache_file=/dev/null
# Line 340 | Line 779 | x_libraries=NONE
779   # and all the variables that are supposed to be based on exec_prefix
780   # by default will actually change.
781   # Use braces instead of parens because sh, perl, etc. also accept them.
782 + # (The list follows the same order as the GNU Coding Standards.)
783   bindir='${exec_prefix}/bin'
784   sbindir='${exec_prefix}/sbin'
785   libexecdir='${exec_prefix}/libexec'
786 < datadir='${prefix}/share'
786 > datarootdir='${prefix}/share'
787 > datadir='${datarootdir}'
788   sysconfdir='${prefix}/etc'
789   sharedstatedir='${prefix}/com'
790   localstatedir='${prefix}/var'
350 libdir='${exec_prefix}/lib'
791   includedir='${prefix}/include'
792   oldincludedir='/usr/include'
793 < infodir='${prefix}/info'
794 < mandir='${prefix}/man'
793 > docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
794 > infodir='${datarootdir}/info'
795 > htmldir='${docdir}'
796 > dvidir='${docdir}'
797 > pdfdir='${docdir}'
798 > psdir='${docdir}'
799 > libdir='${exec_prefix}/lib'
800 > localedir='${datarootdir}/locale'
801 > mandir='${datarootdir}/man'
802  
803   ac_prev=
804 + ac_dashdash=
805   for ac_option
806   do
807    # If the previous option needs an argument, assign it.
808    if test -n "$ac_prev"; then
809 <    eval "$ac_prev=\$ac_option"
809 >    eval $ac_prev=\$ac_option
810      ac_prev=
811      continue
812    fi
813  
814 <  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
814 >  case $ac_option in
815 >  *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
816 >  *)    ac_optarg=yes ;;
817 >  esac
818  
819    # Accept the important Cygnus configure options, so we can diagnose typos.
820  
821 <  case $ac_option in
821 >  case $ac_dashdash$ac_option in
822 >  --)
823 >    ac_dashdash=yes ;;
824  
825    -bindir | --bindir | --bindi | --bind | --bin | --bi)
826      ac_prev=bindir ;;
# Line 389 | Line 842 | do
842    --config-cache | -C)
843      cache_file=config.cache ;;
844  
845 <  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
845 >  -datadir | --datadir | --datadi | --datad)
846      ac_prev=datadir ;;
847 <  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
395 <  | --da=*)
847 >  -datadir=* | --datadir=* | --datadi=* | --datad=*)
848      datadir=$ac_optarg ;;
849  
850 +  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
851 +  | --dataroo | --dataro | --datar)
852 +    ac_prev=datarootdir ;;
853 +  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
854 +  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
855 +    datarootdir=$ac_optarg ;;
856 +
857    -disable-* | --disable-*)
858 <    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
858 >    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
859      # Reject names that are not valid shell variable names.
860 <    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
861 <      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
862 <   { (exit 1); exit 1; }; }
863 <    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
864 <    eval "enable_$ac_feature=no" ;;
860 >    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
861 >      as_fn_error "invalid feature name: $ac_useropt"
862 >    ac_useropt_orig=$ac_useropt
863 >    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
864 >    case $ac_user_opts in
865 >      *"
866 > "enable_$ac_useropt"
867 > "*) ;;
868 >      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
869 >         ac_unrecognized_sep=', ';;
870 >    esac
871 >    eval enable_$ac_useropt=no ;;
872  
873 +  -docdir | --docdir | --docdi | --doc | --do)
874 +    ac_prev=docdir ;;
875 +  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
876 +    docdir=$ac_optarg ;;
877 +
878 +  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
879 +    ac_prev=dvidir ;;
880 +  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
881 +    dvidir=$ac_optarg ;;
882 +
883    -enable-* | --enable-*)
884 <    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
884 >    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
885      # Reject names that are not valid shell variable names.
886 <    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
887 <      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
888 <   { (exit 1); exit 1; }; }
889 <    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
890 <    case $ac_option in
891 <      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
892 <      *) ac_optarg=yes ;;
886 >    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
887 >      as_fn_error "invalid feature name: $ac_useropt"
888 >    ac_useropt_orig=$ac_useropt
889 >    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
890 >    case $ac_user_opts in
891 >      *"
892 > "enable_$ac_useropt"
893 > "*) ;;
894 >      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
895 >         ac_unrecognized_sep=', ';;
896      esac
897 <    eval "enable_$ac_feature='$ac_optarg'" ;;
897 >    eval enable_$ac_useropt=\$ac_optarg ;;
898  
899    -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
900    | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
# Line 442 | Line 921 | do
921    -host=* | --host=* | --hos=* | --ho=*)
922      host_alias=$ac_optarg ;;
923  
924 +  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
925 +    ac_prev=htmldir ;;
926 +  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
927 +  | --ht=*)
928 +    htmldir=$ac_optarg ;;
929 +
930    -includedir | --includedir | --includedi | --included | --include \
931    | --includ | --inclu | --incl | --inc)
932      ac_prev=includedir ;;
# Line 466 | Line 951 | do
951    | --libexe=* | --libex=* | --libe=*)
952      libexecdir=$ac_optarg ;;
953  
954 +  -localedir | --localedir | --localedi | --localed | --locale)
955 +    ac_prev=localedir ;;
956 +  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
957 +    localedir=$ac_optarg ;;
958 +
959    -localstatedir | --localstatedir | --localstatedi | --localstated \
960 <  | --localstate | --localstat | --localsta | --localst \
471 <  | --locals | --local | --loca | --loc | --lo)
960 >  | --localstate | --localstat | --localsta | --localst | --locals)
961      ac_prev=localstatedir ;;
962    -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
963 <  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
475 <  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
963 >  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
964      localstatedir=$ac_optarg ;;
965  
966    -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
# Line 537 | Line 1025 | do
1025    | --progr-tra=* | --program-tr=* | --program-t=*)
1026      program_transform_name=$ac_optarg ;;
1027  
1028 +  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1029 +    ac_prev=pdfdir ;;
1030 +  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1031 +    pdfdir=$ac_optarg ;;
1032 +
1033 +  -psdir | --psdir | --psdi | --psd | --ps)
1034 +    ac_prev=psdir ;;
1035 +  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1036 +    psdir=$ac_optarg ;;
1037 +
1038    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1039    | -silent | --silent | --silen | --sile | --sil)
1040      silent=yes ;;
# Line 587 | Line 1085 | do
1085      ac_init_version=: ;;
1086  
1087    -with-* | --with-*)
1088 <    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1088 >    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1089      # Reject names that are not valid shell variable names.
1090 <    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1091 <      { echo "$as_me: error: invalid package name: $ac_package" >&2
1092 <   { (exit 1); exit 1; }; }
1093 <    ac_package=`echo $ac_package| sed 's/-/_/g'`
1094 <    case $ac_option in
1095 <      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
1096 <      *) ac_optarg=yes ;;
1090 >    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1091 >      as_fn_error "invalid package name: $ac_useropt"
1092 >    ac_useropt_orig=$ac_useropt
1093 >    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1094 >    case $ac_user_opts in
1095 >      *"
1096 > "with_$ac_useropt"
1097 > "*) ;;
1098 >      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1099 >         ac_unrecognized_sep=', ';;
1100      esac
1101 <    eval "with_$ac_package='$ac_optarg'" ;;
1101 >    eval with_$ac_useropt=\$ac_optarg ;;
1102  
1103    -without-* | --without-*)
1104 <    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1104 >    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1105      # Reject names that are not valid shell variable names.
1106 <    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1107 <      { echo "$as_me: error: invalid package name: $ac_package" >&2
1108 <   { (exit 1); exit 1; }; }
1109 <    ac_package=`echo $ac_package | sed 's/-/_/g'`
1110 <    eval "with_$ac_package=no" ;;
1106 >    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1107 >      as_fn_error "invalid package name: $ac_useropt"
1108 >    ac_useropt_orig=$ac_useropt
1109 >    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1110 >    case $ac_user_opts in
1111 >      *"
1112 > "with_$ac_useropt"
1113 > "*) ;;
1114 >      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1115 >         ac_unrecognized_sep=', ';;
1116 >    esac
1117 >    eval with_$ac_useropt=no ;;
1118  
1119    --x)
1120      # Obsolete; use --with-x.
# Line 626 | Line 1134 | do
1134    | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1135      x_libraries=$ac_optarg ;;
1136  
1137 <  -*) { echo "$as_me: error: unrecognized option: $ac_option
1138 < Try \`$0 --help' for more information." >&2
631 <   { (exit 1); exit 1; }; }
1137 >  -*) as_fn_error "unrecognized option: \`$ac_option'
1138 > Try \`$0 --help' for more information."
1139      ;;
1140  
1141    *=*)
1142      ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1143      # Reject names that are not valid shell variable names.
1144 <    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1145 <      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1146 <   { (exit 1); exit 1; }; }
1147 <    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
1148 <    eval "$ac_envvar='$ac_optarg'"
1144 >    case $ac_envvar in #(
1145 >      '' | [0-9]* | *[!_$as_cr_alnum]* )
1146 >      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1147 >    esac
1148 >    eval $ac_envvar=\$ac_optarg
1149      export $ac_envvar ;;
1150  
1151    *)
1152      # FIXME: should be removed in autoconf 3.0.
1153 <    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1153 >    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1154      expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1155 <      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1155 >      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1156      : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1157      ;;
1158  
# Line 654 | Line 1161 | if test -n "$ac_prev"; then
1161  
1162   if test -n "$ac_prev"; then
1163    ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1164 <  { echo "$as_me: error: missing argument to $ac_option" >&2
658 <   { (exit 1); exit 1; }; }
1164 >  as_fn_error "missing argument to $ac_option"
1165   fi
1166  
1167 < # Be sure to have absolute paths.
1168 < for ac_var in exec_prefix prefix
1169 < do
1170 <  eval ac_val=$`echo $ac_var`
1171 <  case $ac_val in
666 <    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
667 <    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
668 <   { (exit 1); exit 1; }; };;
1167 > if test -n "$ac_unrecognized_opts"; then
1168 >  case $enable_option_checking in
1169 >    no) ;;
1170 >    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1171 >    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1172    esac
1173 < done
1173 > fi
1174  
1175 < # Be sure to have absolute paths.
1176 < for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
1177 <              localstatedir libdir includedir oldincludedir infodir mandir
1175 > # Check all directory arguments for consistency.
1176 > for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1177 >                datadir sysconfdir sharedstatedir localstatedir includedir \
1178 >                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1179 >                libdir localedir mandir
1180   do
1181 <  eval ac_val=$`echo $ac_var`
1181 >  eval ac_val=\$$ac_var
1182 >  # Remove trailing slashes.
1183    case $ac_val in
1184 <    [\\/$]* | ?:[\\/]* ) ;;
1185 <    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1186 <   { (exit 1); exit 1; }; };;
1184 >    */ )
1185 >      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1186 >      eval $ac_var=\$ac_val;;
1187    esac
1188 < done
1188 >  # Be sure to have absolute directory names.
1189 >  case $ac_val in
1190 >    [\\/$]* | ?:[\\/]* )  continue;;
1191 >    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1192 >  esac
1193 >  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1194 > done
1195  
1196   # There might be people who depend on the old broken behavior: `$host'
1197   # used to hold the argument of --host etc.
# Line 692 | Line 1204 | if test "x$host_alias" != x; then
1204   if test "x$host_alias" != x; then
1205    if test "x$build_alias" = x; then
1206      cross_compiling=maybe
1207 <    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1207 >    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1208      If a cross compiler is detected then cross compile mode will be used." >&2
1209    elif test "x$build_alias" != "x$host_alias"; then
1210      cross_compiling=yes
# Line 705 | Line 1217 | test "$silent" = yes && exec 6>/dev/null
1217   test "$silent" = yes && exec 6>/dev/null
1218  
1219  
1220 + ac_pwd=`pwd` && test -n "$ac_pwd" &&
1221 + ac_ls_di=`ls -di .` &&
1222 + ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1223 +  as_fn_error "working directory cannot be determined"
1224 + test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1225 +  as_fn_error "pwd does not report name of working directory"
1226 +
1227 +
1228   # Find the source files, if location was not specified.
1229   if test -z "$srcdir"; then
1230    ac_srcdir_defaulted=yes
1231 <  # Try the directory containing this script, then its parent.
1232 <  ac_confdir=`(dirname "$0") 2>/dev/null ||
1233 < $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1234 <         X"$0" : 'X\(//\)[^/]' \| \
1235 <         X"$0" : 'X\(//\)$' \| \
1236 <         X"$0" : 'X\(/\)' \| \
1237 <         .     : '\(.\)' 2>/dev/null ||
1238 < echo X"$0" |
1239 <    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
1240 <          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
1241 <          /^X\(\/\/\)$/{ s//\1/; q; }
1242 <          /^X\(\/\).*/{ s//\1/; q; }
1243 <          s/.*/./; q'`
1231 >  # Try the directory containing this script, then the parent directory.
1232 >  ac_confdir=`$as_dirname -- "$as_myself" ||
1233 > $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1234 >         X"$as_myself" : 'X\(//\)[^/]' \| \
1235 >         X"$as_myself" : 'X\(//\)$' \| \
1236 >         X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1237 > $as_echo X"$as_myself" |
1238 >    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1239 >            s//\1/
1240 >            q
1241 >          }
1242 >          /^X\(\/\/\)[^/].*/{
1243 >            s//\1/
1244 >            q
1245 >          }
1246 >          /^X\(\/\/\)$/{
1247 >            s//\1/
1248 >            q
1249 >          }
1250 >          /^X\(\/\).*/{
1251 >            s//\1/
1252 >            q
1253 >          }
1254 >          s/.*/./; q'`
1255    srcdir=$ac_confdir
1256 <  if test ! -r $srcdir/$ac_unique_file; then
1256 >  if test ! -r "$srcdir/$ac_unique_file"; then
1257      srcdir=..
1258    fi
1259   else
1260    ac_srcdir_defaulted=no
1261   fi
1262 < if test ! -r $srcdir/$ac_unique_file; then
1263 <  if test "$ac_srcdir_defaulted" = yes; then
1264 <    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
734 <   { (exit 1); exit 1; }; }
735 <  else
736 <    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
737 <   { (exit 1); exit 1; }; }
738 <  fi
1262 > if test ! -r "$srcdir/$ac_unique_file"; then
1263 >  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1264 >  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1265   fi
1266 < (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
1267 <  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
1268 <   { (exit 1); exit 1; }; }
1269 < srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
1270 < ac_env_build_alias_set=${build_alias+set}
1271 < ac_env_build_alias_value=$build_alias
1272 < ac_cv_env_build_alias_set=${build_alias+set}
1273 < ac_cv_env_build_alias_value=$build_alias
1274 < ac_env_host_alias_set=${host_alias+set}
1275 < ac_env_host_alias_value=$host_alias
1276 < ac_cv_env_host_alias_set=${host_alias+set}
1277 < ac_cv_env_host_alias_value=$host_alias
1278 < ac_env_target_alias_set=${target_alias+set}
1279 < ac_env_target_alias_value=$target_alias
1280 < ac_cv_env_target_alias_set=${target_alias+set}
1281 < ac_cv_env_target_alias_value=$target_alias
1282 < ac_env_CC_set=${CC+set}
1283 < ac_env_CC_value=$CC
1284 < ac_cv_env_CC_set=${CC+set}
1285 < ac_cv_env_CC_value=$CC
760 < ac_env_CFLAGS_set=${CFLAGS+set}
761 < ac_env_CFLAGS_value=$CFLAGS
762 < ac_cv_env_CFLAGS_set=${CFLAGS+set}
763 < ac_cv_env_CFLAGS_value=$CFLAGS
764 < ac_env_LDFLAGS_set=${LDFLAGS+set}
765 < ac_env_LDFLAGS_value=$LDFLAGS
766 < ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
767 < ac_cv_env_LDFLAGS_value=$LDFLAGS
768 < ac_env_CPPFLAGS_set=${CPPFLAGS+set}
769 < ac_env_CPPFLAGS_value=$CPPFLAGS
770 < ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
771 < ac_cv_env_CPPFLAGS_value=$CPPFLAGS
772 < ac_env_CXX_set=${CXX+set}
773 < ac_env_CXX_value=$CXX
774 < ac_cv_env_CXX_set=${CXX+set}
775 < ac_cv_env_CXX_value=$CXX
776 < ac_env_CXXFLAGS_set=${CXXFLAGS+set}
777 < ac_env_CXXFLAGS_value=$CXXFLAGS
778 < ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
779 < ac_cv_env_CXXFLAGS_value=$CXXFLAGS
780 < ac_env_F90_set=${F90+set}
781 < ac_env_F90_value=$F90
782 < ac_cv_env_F90_set=${F90+set}
783 < ac_cv_env_F90_value=$F90
784 < ac_env_F90FLAGS_set=${F90FLAGS+set}
785 < ac_env_F90FLAGS_value=$F90FLAGS
786 < ac_cv_env_F90FLAGS_set=${F90FLAGS+set}
787 < ac_cv_env_F90FLAGS_value=$F90FLAGS
788 < ac_env_CPP_set=${CPP+set}
789 < ac_env_CPP_value=$CPP
790 < ac_cv_env_CPP_set=${CPP+set}
791 < ac_cv_env_CPP_value=$CPP
1266 > ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1267 > ac_abs_confdir=`(
1268 >        cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1269 >        pwd)`
1270 > # When building in place, set srcdir=.
1271 > if test "$ac_abs_confdir" = "$ac_pwd"; then
1272 >  srcdir=.
1273 > fi
1274 > # Remove unnecessary trailing slashes from srcdir.
1275 > # Double slashes in file names in object file debugging info
1276 > # mess up M-x gdb in Emacs.
1277 > case $srcdir in
1278 > */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1279 > esac
1280 > for ac_var in $ac_precious_vars; do
1281 >  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1282 >  eval ac_env_${ac_var}_value=\$${ac_var}
1283 >  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1284 >  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1285 > done
1286  
1287   #
1288   # Report the --help message.
# Line 797 | Line 1291 | if test "$ac_init_help" = "long"; then
1291    # Omit some internal or obsolete options to make the list less imposing.
1292    # This message is too long to be a string in the A/UX 3.1 sh.
1293    cat <<_ACEOF
1294 < \`configure' configures OOPSE 2.0 to adapt to many kinds of systems.
1294 > \`configure' configures OpenMD 1.0 to adapt to many kinds of systems.
1295  
1296   Usage: $0 [OPTION]... [VAR=VALUE]...
1297  
# Line 817 | Line 1311 | Configuration:
1311    -n, --no-create         do not create output files
1312        --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1313  
820 _ACEOF
821
822  cat <<_ACEOF
1314   Installation directories:
1315    --prefix=PREFIX         install architecture-independent files in PREFIX
1316 <                          [$ac_default_prefix]
1316 >                          [$ac_default_prefix]
1317    --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1318 <                          [PREFIX]
1318 >                          [PREFIX]
1319  
1320   By default, \`make install' will install all the files in
1321   \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
# Line 834 | Line 1325 | Fine tuning of the installation directories:
1325   For better control, use the options below.
1326  
1327   Fine tuning of the installation directories:
1328 <  --bindir=DIR           user executables [EPREFIX/bin]
1329 <  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1330 <  --libexecdir=DIR       program executables [EPREFIX/libexec]
1331 <  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
1332 <  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1333 <  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1334 <  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1335 <  --libdir=DIR           object code libraries [EPREFIX/lib]
1336 <  --includedir=DIR       C header files [PREFIX/include]
1337 <  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1338 <  --infodir=DIR          info documentation [PREFIX/info]
1339 <  --mandir=DIR           man documentation [PREFIX/man]
1328 >  --bindir=DIR            user executables [EPREFIX/bin]
1329 >  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1330 >  --libexecdir=DIR        program executables [EPREFIX/libexec]
1331 >  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1332 >  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1333 >  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1334 >  --libdir=DIR            object code libraries [EPREFIX/lib]
1335 >  --includedir=DIR        C header files [PREFIX/include]
1336 >  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1337 >  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1338 >  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1339 >  --infodir=DIR           info documentation [DATAROOTDIR/info]
1340 >  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1341 >  --mandir=DIR            man documentation [DATAROOTDIR/man]
1342 >  --docdir=DIR            documentation root [DATAROOTDIR/doc/openmd]
1343 >  --htmldir=DIR           html documentation [DOCDIR]
1344 >  --dvidir=DIR            dvi documentation [DOCDIR]
1345 >  --pdfdir=DIR            pdf documentation [DOCDIR]
1346 >  --psdir=DIR             ps documentation [DOCDIR]
1347   _ACEOF
1348  
1349    cat <<\_ACEOF
# Line 858 | Line 1356 | if test -n "$ac_init_help"; then
1356  
1357   if test -n "$ac_init_help"; then
1358    case $ac_init_help in
1359 <     short | recursive ) echo "Configuration of OOPSE 2.0:";;
1359 >     short | recursive ) echo "Configuration of OpenMD 1.0:";;
1360     esac
1361    cat <<\_ACEOF
1362  
1363   Optional Features:
1364 +  --disable-option-checking  ignore unrecognized --enable/--with options
1365    --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1366    --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1367 <  --enable-debug          Compile OOPSE in debug mode
1368 <  --enable-oopse-home=DIR      define oopse home dir PREFIX/oopse
1367 >  --enable-openmd-home=DIR      define OpenMD home dir PREFIX/openmd
1368 >  --enable-debug          Compile OpenMD in debug mode
1369 >  --enable-single         compile OpenMD in single precision
1370 >  --enable-float          synonym for --enable-single
1371 >  --enable-doxygen        enable documentation generation with doxygen (auto)
1372 >  --enable-dot            use 'dot' to generate graphs in doxygen (auto)
1373 >  --enable-html-docs      enable HTML generation with doxygen (yes)
1374 >  --enable-latex-docs     enable LaTeX documentation generation with doxygen (no)
1375  
1376   Optional Packages:
1377    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1378    --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1379 <  --with-mpi=<prefix>     compile with MPI installed in <prefix> [default=no]
1380 <  --with-sprng=<prefix>   compile with SPRNG installed in <prefix>
1381 <                          [default=/usr/local]
1382 <  --with-mkl              Do we want MKL will check /usr/local/intel/mkl61 /opt/intel/mkl61
1379 >  --with-perl-shebang     override what perl thinks is the way for the kernel
1380 >                          to start it (seldom needed)
1381 >  --with-zlib=DIR         root directory path of zlib installation (defaults
1382 >                          to /usr/local or /usr if not found in /usr/local)
1383 >  --with-fftw=DIR         root directory path of fftw installation (defaults
1384 >                          to /usr/local or /usr if not found in /usr/local)
1385 >  --with-qhull=DIR        root directory path of qhull installation (defaults
1386 >                          to /usr/local or /usr if not found in /usr/local)
1387 >  --with-openbabel=DIR    root directory path of openbabel-2.x installation
1388 >                          (defaults to /usr/local or /usr if not found in
1389 >                          /usr/local)
1390  
1391   Some influential environment variables:
880  CC          C compiler command
881  CFLAGS      C compiler flags
882  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
883              nonstandard directory <lib dir>
884  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
885              headers in a nonstandard directory <include dir>
1392    CXX         C++ compiler command
1393    CXXFLAGS    C++ compiler flags
1394 <  F90         Fortran 90 compiler command
1395 <  F90FLAGS    Fortran 90 compiler flags
1394 >  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1395 >              nonstandard directory <lib dir>
1396 >  LIBS        libraries to pass to the linker, e.g. -l<library>
1397 >  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1398 >              you have headers in a nonstandard directory <include dir>
1399 >  CC          C compiler command
1400 >  CFLAGS      C compiler flags
1401 >  FC          Fortran compiler command
1402 >  FCFLAGS     Fortran compiler flags
1403 >  MPICXX      MPI C++ compiler command
1404 >  MPICC       MPI C compiler command
1405 >  MPIFC       MPI Fortran compiler command
1406    CPP         C preprocessor
1407 +  CXXCPP      C++ preprocessor
1408  
1409   Use these variables to override the choices made by `configure' or to help
1410   it to find libraries and programs with nonstandard names/locations.
1411  
1412   Report bugs to <gezelter@nd.edu>.
1413   _ACEOF
1414 + ac_status=$?
1415   fi
1416  
1417   if test "$ac_init_help" = "recursive"; then
1418    # If there are subdirs, report their specific --help.
901  ac_popdir=`pwd`
1419    for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1420 <    test -d $ac_dir || continue
1420 >    test -d "$ac_dir" ||
1421 >      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1422 >      continue
1423      ac_builddir=.
1424  
1425 < if test "$ac_dir" != .; then
1426 <  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1427 <  # A "../" for each directory in $ac_dir_suffix.
1428 <  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
1429 < else
1430 <  ac_dir_suffix= ac_top_builddir=
1431 < fi
1425 > case "$ac_dir" in
1426 > .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1427 > *)
1428 >  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1429 >  # A ".." for each directory in $ac_dir_suffix.
1430 >  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1431 >  case $ac_top_builddir_sub in
1432 >  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1433 >  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1434 >  esac ;;
1435 > esac
1436 > ac_abs_top_builddir=$ac_pwd
1437 > ac_abs_builddir=$ac_pwd$ac_dir_suffix
1438 > # for backward compatibility:
1439 > ac_top_builddir=$ac_top_build_prefix
1440  
1441   case $srcdir in
1442 <  .)  # No --srcdir option.  We are building in place.
1442 >  .)  # We are building in place.
1443      ac_srcdir=.
1444 <    if test -z "$ac_top_builddir"; then
1445 <       ac_top_srcdir=.
1446 <    else
920 <       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
921 <    fi ;;
922 <  [\\/]* | ?:[\\/]* )  # Absolute path.
1444 >    ac_top_srcdir=$ac_top_builddir_sub
1445 >    ac_abs_top_srcdir=$ac_pwd ;;
1446 >  [\\/]* | ?:[\\/]* )  # Absolute name.
1447      ac_srcdir=$srcdir$ac_dir_suffix;
1448 <    ac_top_srcdir=$srcdir ;;
1449 <  *) # Relative path.
1450 <    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
1451 <    ac_top_srcdir=$ac_top_builddir$srcdir ;;
1452 < esac
1453 <
930 < # Do not use `cd foo && pwd` to compute absolute paths, because
931 < # the directories may not exist.
932 < case `pwd` in
933 < .) ac_abs_builddir="$ac_dir";;
934 < *)
935 <  case "$ac_dir" in
936 <  .) ac_abs_builddir=`pwd`;;
937 <  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
938 <  *) ac_abs_builddir=`pwd`/"$ac_dir";;
939 <  esac;;
1448 >    ac_top_srcdir=$srcdir
1449 >    ac_abs_top_srcdir=$srcdir ;;
1450 >  *) # Relative name.
1451 >    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1452 >    ac_top_srcdir=$ac_top_build_prefix$srcdir
1453 >    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1454   esac
1455 < case $ac_abs_builddir in
942 < .) ac_abs_top_builddir=${ac_top_builddir}.;;
943 < *)
944 <  case ${ac_top_builddir}. in
945 <  .) ac_abs_top_builddir=$ac_abs_builddir;;
946 <  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
947 <  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
948 <  esac;;
949 < esac
950 < case $ac_abs_builddir in
951 < .) ac_abs_srcdir=$ac_srcdir;;
952 < *)
953 <  case $ac_srcdir in
954 <  .) ac_abs_srcdir=$ac_abs_builddir;;
955 <  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
956 <  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
957 <  esac;;
958 < esac
959 < case $ac_abs_builddir in
960 < .) ac_abs_top_srcdir=$ac_top_srcdir;;
961 < *)
962 <  case $ac_top_srcdir in
963 <  .) ac_abs_top_srcdir=$ac_abs_builddir;;
964 <  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
965 <  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
966 <  esac;;
967 < esac
1455 > ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1456  
1457 <    cd $ac_dir
1458 <    # Check for guested configure; otherwise get Cygnus style configure.
1459 <    if test -f $ac_srcdir/configure.gnu; then
1460 <      echo
1461 <      $SHELL $ac_srcdir/configure.gnu  --help=recursive
1462 <    elif test -f $ac_srcdir/configure; then
1463 <      echo
1464 <      $SHELL $ac_srcdir/configure  --help=recursive
977 <    elif test -f $ac_srcdir/configure.ac ||
978 <           test -f $ac_srcdir/configure.in; then
979 <      echo
980 <      $ac_configure --help
1457 >    cd "$ac_dir" || { ac_status=$?; continue; }
1458 >    # Check for guested configure.
1459 >    if test -f "$ac_srcdir/configure.gnu"; then
1460 >      echo &&
1461 >      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1462 >    elif test -f "$ac_srcdir/configure"; then
1463 >      echo &&
1464 >      $SHELL "$ac_srcdir/configure" --help=recursive
1465      else
1466 <      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1467 <    fi
1468 <    cd $ac_popdir
1466 >      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1467 >    fi || ac_status=$?
1468 >    cd "$ac_pwd" || { ac_status=$?; break; }
1469    done
1470   fi
1471  
1472 < test -n "$ac_init_help" && exit 0
1472 > test -n "$ac_init_help" && exit $ac_status
1473   if $ac_init_version; then
1474    cat <<\_ACEOF
1475 < OOPSE configure 2.0
1476 < generated by GNU Autoconf 2.59
1475 > OpenMD configure 1.0
1476 > generated by GNU Autoconf 2.65
1477  
1478 < Copyright (C) 2003 Free Software Foundation, Inc.
1478 > Copyright (C) 2009 Free Software Foundation, Inc.
1479   This configure script is free software; the Free Software Foundation
1480   gives unlimited permission to copy, distribute and modify it.
1481   _ACEOF
1482 <  exit 0
1482 >  exit
1483   fi
1000 exec 5>config.log
1001 cat >&5 <<_ACEOF
1002 This file contains any messages produced by compilers while
1003 running configure, to aid debugging if configure makes a mistake.
1484  
1485 < It was created by OOPSE $as_me 2.0, which was
1486 < generated by GNU Autoconf 2.59.  Invocation command line was
1485 > ## ------------------------ ##
1486 > ## Autoconf initialization. ##
1487 > ## ------------------------ ##
1488  
1489 <  $ $0 $@
1490 <
1491 < _ACEOF
1489 > # ac_fn_cxx_try_compile LINENO
1490 > # ----------------------------
1491 > # Try to compile conftest.$ac_ext, and return whether this succeeded.
1492 > ac_fn_cxx_try_compile ()
1493   {
1494 < cat <<_ASUNAME
1495 < ## --------- ##
1496 < ## Platform. ##
1497 < ## --------- ##
1494 >  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1495 >  rm -f conftest.$ac_objext
1496 >  if { { ac_try="$ac_compile"
1497 > case "(($ac_try" in
1498 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1499 >  *) ac_try_echo=$ac_try;;
1500 > esac
1501 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1502 > $as_echo "$ac_try_echo"; } >&5
1503 >  (eval "$ac_compile") 2>conftest.err
1504 >  ac_status=$?
1505 >  if test -s conftest.err; then
1506 >    grep -v '^ *+' conftest.err >conftest.er1
1507 >    cat conftest.er1 >&5
1508 >    mv -f conftest.er1 conftest.err
1509 >  fi
1510 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1511 >  test $ac_status = 0; } && {
1512 >         test -z "$ac_cxx_werror_flag" ||
1513 >         test ! -s conftest.err
1514 >       } && test -s conftest.$ac_objext; then :
1515 >  ac_retval=0
1516 > else
1517 >  $as_echo "$as_me: failed program was:" >&5
1518 > sed 's/^/| /' conftest.$ac_ext >&5
1519  
1520 < hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1521 < uname -m = `(uname -m) 2>/dev/null || echo unknown`
1522 < uname -r = `(uname -r) 2>/dev/null || echo unknown`
1523 < uname -s = `(uname -s) 2>/dev/null || echo unknown`
1021 < uname -v = `(uname -v) 2>/dev/null || echo unknown`
1520 >        ac_retval=1
1521 > fi
1522 >  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1523 >  as_fn_set_status $ac_retval
1524  
1525 < /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1024 < /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1525 > } # ac_fn_cxx_try_compile
1526  
1527 < /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1528 < /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1529 < /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1530 < hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1531 < /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1532 < /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1533 < /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1527 > # ac_fn_c_try_compile LINENO
1528 > # --------------------------
1529 > # Try to compile conftest.$ac_ext, and return whether this succeeded.
1530 > ac_fn_c_try_compile ()
1531 > {
1532 >  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1533 >  rm -f conftest.$ac_objext
1534 >  if { { ac_try="$ac_compile"
1535 > case "(($ac_try" in
1536 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1537 >  *) ac_try_echo=$ac_try;;
1538 > esac
1539 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1540 > $as_echo "$ac_try_echo"; } >&5
1541 >  (eval "$ac_compile") 2>conftest.err
1542 >  ac_status=$?
1543 >  if test -s conftest.err; then
1544 >    grep -v '^ *+' conftest.err >conftest.er1
1545 >    cat conftest.er1 >&5
1546 >    mv -f conftest.er1 conftest.err
1547 >  fi
1548 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1549 >  test $ac_status = 0; } && {
1550 >         test -z "$ac_c_werror_flag" ||
1551 >         test ! -s conftest.err
1552 >       } && test -s conftest.$ac_objext; then :
1553 >  ac_retval=0
1554 > else
1555 >  $as_echo "$as_me: failed program was:" >&5
1556 > sed 's/^/| /' conftest.$ac_ext >&5
1557  
1558 < _ASUNAME
1558 >        ac_retval=1
1559 > fi
1560 >  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1561 >  as_fn_set_status $ac_retval
1562  
1563 < as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1037 < for as_dir in $PATH
1038 < do
1039 <  IFS=$as_save_IFS
1040 <  test -z "$as_dir" && as_dir=.
1041 <  echo "PATH: $as_dir"
1042 < done
1563 > } # ac_fn_c_try_compile
1564  
1565 < } >&5
1565 > # ac_fn_fc_try_compile LINENO
1566 > # ---------------------------
1567 > # Try to compile conftest.$ac_ext, and return whether this succeeded.
1568 > ac_fn_fc_try_compile ()
1569 > {
1570 >  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1571 >  rm -f conftest.$ac_objext
1572 >  if { { ac_try="$ac_compile"
1573 > case "(($ac_try" in
1574 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1575 >  *) ac_try_echo=$ac_try;;
1576 > esac
1577 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1578 > $as_echo "$ac_try_echo"; } >&5
1579 >  (eval "$ac_compile") 2>conftest.err
1580 >  ac_status=$?
1581 >  if test -s conftest.err; then
1582 >    grep -v '^ *+' conftest.err >conftest.er1
1583 >    cat conftest.er1 >&5
1584 >    mv -f conftest.er1 conftest.err
1585 >  fi
1586 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1587 >  test $ac_status = 0; } && {
1588 >         test -z "$ac_fc_werror_flag" ||
1589 >         test ! -s conftest.err
1590 >       } && test -s conftest.$ac_objext; then :
1591 >  ac_retval=0
1592 > else
1593 >  $as_echo "$as_me: failed program was:" >&5
1594 > sed 's/^/| /' conftest.$ac_ext >&5
1595  
1596 < cat >&5 <<_ACEOF
1596 >        ac_retval=1
1597 > fi
1598 >  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1599 >  as_fn_set_status $ac_retval
1600  
1601 + } # ac_fn_fc_try_compile
1602  
1603 < ## ----------- ##
1604 < ## Core tests. ##
1605 < ## ----------- ##
1606 <
1607 < _ACEOF
1603 > # ac_fn_cxx_try_link LINENO
1604 > # -------------------------
1605 > # Try to link conftest.$ac_ext, and return whether this succeeded.
1606 > ac_fn_cxx_try_link ()
1607 > {
1608 >  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1609 >  rm -f conftest.$ac_objext conftest$ac_exeext
1610 >  if { { ac_try="$ac_link"
1611 > case "(($ac_try" in
1612 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1613 >  *) ac_try_echo=$ac_try;;
1614 > esac
1615 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1616 > $as_echo "$ac_try_echo"; } >&5
1617 >  (eval "$ac_link") 2>conftest.err
1618 >  ac_status=$?
1619 >  if test -s conftest.err; then
1620 >    grep -v '^ *+' conftest.err >conftest.er1
1621 >    cat conftest.er1 >&5
1622 >    mv -f conftest.er1 conftest.err
1623 >  fi
1624 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1625 >  test $ac_status = 0; } && {
1626 >         test -z "$ac_cxx_werror_flag" ||
1627 >         test ! -s conftest.err
1628 >       } && test -s conftest$ac_exeext && {
1629 >         test "$cross_compiling" = yes ||
1630 >         $as_test_x conftest$ac_exeext
1631 >       }; then :
1632 >  ac_retval=0
1633 > else
1634 >  $as_echo "$as_me: failed program was:" >&5
1635 > sed 's/^/| /' conftest.$ac_ext >&5
1636  
1637 +        ac_retval=1
1638 + fi
1639 +  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1640 +  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1641 +  # interfere with the next link command; also delete a directory that is
1642 +  # left behind by Apple's compiler.  We do this before executing the actions.
1643 +  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1644 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1645 +  as_fn_set_status $ac_retval
1646  
1647 < # Keep a trace of the command line.
1057 < # Strip out --no-create and --no-recursion so they do not pile up.
1058 < # Strip out --silent because we don't want to record it for future runs.
1059 < # Also quote any args containing shell meta-characters.
1060 < # Make two passes to allow for proper duplicate-argument suppression.
1061 < ac_configure_args=
1062 < ac_configure_args0=
1063 < ac_configure_args1=
1064 < ac_sep=
1065 < ac_must_keep_next=false
1066 < for ac_pass in 1 2
1067 < do
1068 <  for ac_arg
1069 <  do
1070 <    case $ac_arg in
1071 <    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1072 <    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1073 <    | -silent | --silent | --silen | --sile | --sil)
1074 <      continue ;;
1075 <    *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1076 <      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1077 <    esac
1078 <    case $ac_pass in
1079 <    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1080 <    2)
1081 <      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1082 <      if test $ac_must_keep_next = true; then
1083 <        ac_must_keep_next=false # Got value, back to normal.
1084 <      else
1085 <        case $ac_arg in
1086 <          *=* | --config-cache | -C | -disable-* | --disable-* \
1087 <          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1088 <          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1089 <          | -with-* | --with-* | -without-* | --without-* | --x)
1090 <            case "$ac_configure_args0 " in
1091 <              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1092 <            esac
1093 <            ;;
1094 <          -* ) ac_must_keep_next=true ;;
1095 <        esac
1096 <      fi
1097 <      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1098 <      # Get rid of the leading space.
1099 <      ac_sep=" "
1100 <      ;;
1101 <    esac
1102 <  done
1103 < done
1104 < $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1105 < $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1647 > } # ac_fn_cxx_try_link
1648  
1649 < # When interrupted or exit'd, cleanup temporary files, and complete
1650 < # config.log.  We remove comments because anyway the quotes in there
1651 < # would cause problems or look ugly.
1652 < # WARNING: Be sure not to use single quotes in there, as some shells,
1111 < # such as our DU 5.0 friend, will then `close' the trap.
1112 < trap 'exit_status=$?
1113 <  # Save into config.log some information that might help in debugging.
1114 <  {
1115 <    echo
1116 <
1117 <    cat <<\_ASBOX
1118 < ## ---------------- ##
1119 < ## Cache variables. ##
1120 < ## ---------------- ##
1121 < _ASBOX
1122 <    echo
1123 <    # The following way of writing the cache mishandles newlines in values,
1649 > # ac_fn_cxx_check_func LINENO FUNC VAR
1650 > # ------------------------------------
1651 > # Tests whether FUNC exists, setting the cache variable VAR accordingly
1652 > ac_fn_cxx_check_func ()
1653   {
1654 <  (set) 2>&1 |
1655 <    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1656 <    *ac_space=\ *)
1657 <      sed -n \
1658 <        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1659 <          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1660 <      ;;
1661 <    *)
1662 <      sed -n \
1663 <        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1664 <      ;;
1136 <    esac;
1137 < }
1138 <    echo
1654 >  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1655 >  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1656 > $as_echo_n "checking for $2... " >&6; }
1657 > if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1658 >  $as_echo_n "(cached) " >&6
1659 > else
1660 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1661 > /* end confdefs.h.  */
1662 > /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1663 >   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1664 > #define $2 innocuous_$2
1665  
1666 <    cat <<\_ASBOX
1667 < ## ----------------- ##
1668 < ## Output variables. ##
1669 < ## ----------------- ##
1144 < _ASBOX
1145 <    echo
1146 <    for ac_var in $ac_subst_vars
1147 <    do
1148 <      eval ac_val=$`echo $ac_var`
1149 <      echo "$ac_var='"'"'$ac_val'"'"'"
1150 <    done | sort
1151 <    echo
1666 > /* System header to define __stub macros and hopefully few prototypes,
1667 >    which can conflict with char $2 (); below.
1668 >    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1669 >    <limits.h> exists even on freestanding compilers.  */
1670  
1671 <    if test -n "$ac_subst_files"; then
1672 <      cat <<\_ASBOX
1673 < ## ------------- ##
1674 < ## Output files. ##
1675 < ## ------------- ##
1158 < _ASBOX
1159 <      echo
1160 <      for ac_var in $ac_subst_files
1161 <      do
1162 <        eval ac_val=$`echo $ac_var`
1163 <        echo "$ac_var='"'"'$ac_val'"'"'"
1164 <      done | sort
1165 <      echo
1166 <    fi
1671 > #ifdef __STDC__
1672 > # include <limits.h>
1673 > #else
1674 > # include <assert.h>
1675 > #endif
1676  
1677 <    if test -s confdefs.h; then
1169 <      cat <<\_ASBOX
1170 < ## ----------- ##
1171 < ## confdefs.h. ##
1172 < ## ----------- ##
1173 < _ASBOX
1174 <      echo
1175 <      sed "/^$/d" confdefs.h | sort
1176 <      echo
1177 <    fi
1178 <    test "$ac_signal" != 0 &&
1179 <      echo "$as_me: caught signal $ac_signal"
1180 <    echo "$as_me: exit $exit_status"
1181 <  } >&5
1182 <  rm -f core *.core &&
1183 <  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1184 <    exit $exit_status
1185 <     ' 0
1186 < for ac_signal in 1 2 13 15; do
1187 <  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1188 < done
1189 < ac_signal=0
1677 > #undef $2
1678  
1679 < # confdefs.h avoids OS command line length limits that DEFS can exceed.
1680 < rm -rf conftest* confdefs.h
1681 < # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1682 < echo >confdefs.h
1679 > /* Override any GCC internal prototype to avoid an error.
1680 >   Use char because int might match the return type of a GCC
1681 >   builtin and then its argument prototype would still apply.  */
1682 > #ifdef __cplusplus
1683 > extern "C"
1684 > #endif
1685 > char $2 ();
1686 > /* The GNU C library defines this for functions which it implements
1687 >    to always fail with ENOSYS.  Some functions are actually named
1688 >    something starting with __ and the normal name is an alias.  */
1689 > #if defined __stub_$2 || defined __stub___$2
1690 > choke me
1691 > #endif
1692  
1693 < # Predefined preprocessor variables.
1694 <
1695 < cat >>confdefs.h <<_ACEOF
1696 < #define PACKAGE_NAME "$PACKAGE_NAME"
1693 > int
1694 > main ()
1695 > {
1696 > return $2 ();
1697 >  ;
1698 >  return 0;
1699 > }
1700   _ACEOF
1701 + if ac_fn_cxx_try_link "$LINENO"; then :
1702 +  eval "$3=yes"
1703 + else
1704 +  eval "$3=no"
1705 + fi
1706 + rm -f core conftest.err conftest.$ac_objext \
1707 +    conftest$ac_exeext conftest.$ac_ext
1708 + fi
1709 + eval ac_res=\$$3
1710 +               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1711 + $as_echo "$ac_res" >&6; }
1712 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1713  
1714 + } # ac_fn_cxx_check_func
1715  
1716 < cat >>confdefs.h <<_ACEOF
1717 < #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1718 < _ACEOF
1716 > # ac_fn_c_try_link LINENO
1717 > # -----------------------
1718 > # Try to link conftest.$ac_ext, and return whether this succeeded.
1719 > ac_fn_c_try_link ()
1720 > {
1721 >  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1722 >  rm -f conftest.$ac_objext conftest$ac_exeext
1723 >  if { { ac_try="$ac_link"
1724 > case "(($ac_try" in
1725 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1726 >  *) ac_try_echo=$ac_try;;
1727 > esac
1728 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1729 > $as_echo "$ac_try_echo"; } >&5
1730 >  (eval "$ac_link") 2>conftest.err
1731 >  ac_status=$?
1732 >  if test -s conftest.err; then
1733 >    grep -v '^ *+' conftest.err >conftest.er1
1734 >    cat conftest.er1 >&5
1735 >    mv -f conftest.er1 conftest.err
1736 >  fi
1737 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1738 >  test $ac_status = 0; } && {
1739 >         test -z "$ac_c_werror_flag" ||
1740 >         test ! -s conftest.err
1741 >       } && test -s conftest$ac_exeext && {
1742 >         test "$cross_compiling" = yes ||
1743 >         $as_test_x conftest$ac_exeext
1744 >       }; then :
1745 >  ac_retval=0
1746 > else
1747 >  $as_echo "$as_me: failed program was:" >&5
1748 > sed 's/^/| /' conftest.$ac_ext >&5
1749  
1750 +        ac_retval=1
1751 + fi
1752 +  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1753 +  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1754 +  # interfere with the next link command; also delete a directory that is
1755 +  # left behind by Apple's compiler.  We do this before executing the actions.
1756 +  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1757 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1758 +  as_fn_set_status $ac_retval
1759  
1760 < cat >>confdefs.h <<_ACEOF
1209 < #define PACKAGE_VERSION "$PACKAGE_VERSION"
1210 < _ACEOF
1760 > } # ac_fn_c_try_link
1761  
1762 + # ac_fn_c_check_func LINENO FUNC VAR
1763 + # ----------------------------------
1764 + # Tests whether FUNC exists, setting the cache variable VAR accordingly
1765 + ac_fn_c_check_func ()
1766 + {
1767 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769 + $as_echo_n "checking for $2... " >&6; }
1770 + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1771 +  $as_echo_n "(cached) " >&6
1772 + else
1773 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1774 + /* end confdefs.h.  */
1775 + /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1776 +   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1777 + #define $2 innocuous_$2
1778  
1779 < cat >>confdefs.h <<_ACEOF
1780 < #define PACKAGE_STRING "$PACKAGE_STRING"
1781 < _ACEOF
1779 > /* System header to define __stub macros and hopefully few prototypes,
1780 >    which can conflict with char $2 (); below.
1781 >    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1782 >    <limits.h> exists even on freestanding compilers.  */
1783  
1784 + #ifdef __STDC__
1785 + # include <limits.h>
1786 + #else
1787 + # include <assert.h>
1788 + #endif
1789  
1790 < cat >>confdefs.h <<_ACEOF
1219 < #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1220 < _ACEOF
1790 > #undef $2
1791  
1792 + /* Override any GCC internal prototype to avoid an error.
1793 +   Use char because int might match the return type of a GCC
1794 +   builtin and then its argument prototype would still apply.  */
1795 + #ifdef __cplusplus
1796 + extern "C"
1797 + #endif
1798 + char $2 ();
1799 + /* The GNU C library defines this for functions which it implements
1800 +    to always fail with ENOSYS.  Some functions are actually named
1801 +    something starting with __ and the normal name is an alias.  */
1802 + #if defined __stub_$2 || defined __stub___$2
1803 + choke me
1804 + #endif
1805  
1806 < # Let the site file select an alternate cache file if it wants to.
1807 < # Prefer explicitly selected file to automatically selected ones.
1808 < if test -z "$CONFIG_SITE"; then
1809 <  if test "x$prefix" != xNONE; then
1810 <    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1811 <  else
1812 <    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1813 <  fi
1806 > int
1807 > main ()
1808 > {
1809 > return $2 ();
1810 >  ;
1811 >  return 0;
1812 > }
1813 > _ACEOF
1814 > if ac_fn_c_try_link "$LINENO"; then :
1815 >  eval "$3=yes"
1816 > else
1817 >  eval "$3=no"
1818   fi
1819 < for ac_site_file in $CONFIG_SITE; do
1820 <  if test -r "$ac_site_file"; then
1821 <    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1822 < echo "$as_me: loading site script $ac_site_file" >&6;}
1823 <    sed 's/^/| /' "$ac_site_file" >&5
1824 <    . "$ac_site_file"
1825 <  fi
1239 < done
1819 > rm -f core conftest.err conftest.$ac_objext \
1820 >    conftest$ac_exeext conftest.$ac_ext
1821 > fi
1822 > eval ac_res=\$$3
1823 >               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1824 > $as_echo "$ac_res" >&6; }
1825 >  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1826  
1827 < if test -r "$cache_file"; then
1828 <  # Some versions of bash will fail to source /dev/null (special
1829 <  # files actually), so we avoid doing that.
1830 <  if test -f "$cache_file"; then
1831 <    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1832 < echo "$as_me: loading cache $cache_file" >&6;}
1833 <    case $cache_file in
1834 <      [\\/]* | ?:[\\/]* ) . $cache_file;;
1835 <      *)                      . ./$cache_file;;
1836 <    esac
1827 > } # ac_fn_c_check_func
1828 >
1829 > # ac_fn_fc_try_link LINENO
1830 > # ------------------------
1831 > # Try to link conftest.$ac_ext, and return whether this succeeded.
1832 > ac_fn_fc_try_link ()
1833 > {
1834 >  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1835 >  rm -f conftest.$ac_objext conftest$ac_exeext
1836 >  if { { ac_try="$ac_link"
1837 > case "(($ac_try" in
1838 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1839 >  *) ac_try_echo=$ac_try;;
1840 > esac
1841 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1842 > $as_echo "$ac_try_echo"; } >&5
1843 >  (eval "$ac_link") 2>conftest.err
1844 >  ac_status=$?
1845 >  if test -s conftest.err; then
1846 >    grep -v '^ *+' conftest.err >conftest.er1
1847 >    cat conftest.er1 >&5
1848 >    mv -f conftest.er1 conftest.err
1849    fi
1850 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1851 +  test $ac_status = 0; } && {
1852 +         test -z "$ac_fc_werror_flag" ||
1853 +         test ! -s conftest.err
1854 +       } && test -s conftest$ac_exeext && {
1855 +         test "$cross_compiling" = yes ||
1856 +         $as_test_x conftest$ac_exeext
1857 +       }; then :
1858 +  ac_retval=0
1859   else
1860 <  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1861 < echo "$as_me: creating cache $cache_file" >&6;}
1255 <  >$cache_file
1256 < fi
1860 >  $as_echo "$as_me: failed program was:" >&5
1861 > sed 's/^/| /' conftest.$ac_ext >&5
1862  
1863 < # Check that the precious variables saved in the cache have kept the same
1259 < # value.
1260 < ac_cache_corrupted=false
1261 < for ac_var in `(set) 2>&1 |
1262 <               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1263 <  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1264 <  eval ac_new_set=\$ac_env_${ac_var}_set
1265 <  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1266 <  eval ac_new_val="\$ac_env_${ac_var}_value"
1267 <  case $ac_old_set,$ac_new_set in
1268 <    set,)
1269 <      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1270 < echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1271 <      ac_cache_corrupted=: ;;
1272 <    ,set)
1273 <      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1274 < echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1275 <      ac_cache_corrupted=: ;;
1276 <    ,);;
1277 <    *)
1278 <      if test "x$ac_old_val" != "x$ac_new_val"; then
1279 <        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1280 < echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1281 <        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1282 < echo "$as_me:   former value:  $ac_old_val" >&2;}
1283 <        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1284 < echo "$as_me:   current value: $ac_new_val" >&2;}
1285 <        ac_cache_corrupted=:
1286 <      fi;;
1287 <  esac
1288 <  # Pass precious variables to config.status.
1289 <  if test "$ac_new_set" = set; then
1290 <    case $ac_new_val in
1291 <    *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1292 <      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1293 <    *) ac_arg=$ac_var=$ac_new_val ;;
1294 <    esac
1295 <    case " $ac_configure_args " in
1296 <      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1297 <      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1298 <    esac
1299 <  fi
1300 < done
1301 < if $ac_cache_corrupted; then
1302 <  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1303 < echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1304 <  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1305 < echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1306 <   { (exit 1); exit 1; }; }
1863 >        ac_retval=1
1864   fi
1865 +  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1866 +  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1867 +  # interfere with the next link command; also delete a directory that is
1868 +  # left behind by Apple's compiler.  We do this before executing the actions.
1869 +  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1870 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1871 +  as_fn_set_status $ac_retval
1872  
1873 < ac_ext=c
1310 < ac_cpp='$CPP $CPPFLAGS'
1311 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1312 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1313 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
1873 > } # ac_fn_fc_try_link
1874  
1875 + # ac_fn_c_try_cpp LINENO
1876 + # ----------------------
1877 + # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1878 + ac_fn_c_try_cpp ()
1879 + {
1880 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 +  if { { ac_try="$ac_cpp conftest.$ac_ext"
1882 + case "(($ac_try" in
1883 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1884 +  *) ac_try_echo=$ac_try;;
1885 + esac
1886 + eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1887 + $as_echo "$ac_try_echo"; } >&5
1888 +  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1889 +  ac_status=$?
1890 +  if test -s conftest.err; then
1891 +    grep -v '^ *+' conftest.err >conftest.er1
1892 +    cat conftest.er1 >&5
1893 +    mv -f conftest.er1 conftest.err
1894 +  fi
1895 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1896 +  test $ac_status = 0; } >/dev/null && {
1897 +         test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1898 +         test ! -s conftest.err
1899 +       }; then :
1900 +  ac_retval=0
1901 + else
1902 +  $as_echo "$as_me: failed program was:" >&5
1903 + sed 's/^/| /' conftest.$ac_ext >&5
1904  
1905 +    ac_retval=1
1906 + fi
1907 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1908 +  as_fn_set_status $ac_retval
1909  
1910 + } # ac_fn_c_try_cpp
1911  
1912 <
1913 <
1914 <
1915 <
1916 <
1917 <
1918 <
1919 <
1920 <
1921 <
1922 <
1923 <
1912 > # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1913 > # -------------------------------------------------------
1914 > # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1915 > # the include files in INCLUDES and setting the cache variable VAR
1916 > # accordingly.
1917 > ac_fn_c_check_header_mongrel ()
1918 > {
1919 >  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 >  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1921 >  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1922 > $as_echo_n "checking for $2... " >&6; }
1923 > if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1924 >  $as_echo_n "(cached) " >&6
1925 > fi
1926 > eval ac_res=\$$3
1927 >               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928 > $as_echo "$ac_res" >&6; }
1929 > else
1930 >  # Is the header compilable?
1931 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1932 > $as_echo_n "checking $2 usability... " >&6; }
1933 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934 > /* end confdefs.h.  */
1935 > $4
1936 > #include <$2>
1937 > _ACEOF
1938 > if ac_fn_c_try_compile "$LINENO"; then :
1939 >  ac_header_compiler=yes
1940 > else
1941 >  ac_header_compiler=no
1942 > fi
1943 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1944 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1945 > $as_echo "$ac_header_compiler" >&6; }
1946  
1947 + # Is the header present?
1948 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1949 + $as_echo_n "checking $2 presence... " >&6; }
1950 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951 + /* end confdefs.h.  */
1952 + #include <$2>
1953 + _ACEOF
1954 + if ac_fn_c_try_cpp "$LINENO"; then :
1955 +  ac_header_preproc=yes
1956 + else
1957 +  ac_header_preproc=no
1958 + fi
1959 + rm -f conftest.err conftest.$ac_ext
1960 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1961 + $as_echo "$ac_header_preproc" >&6; }
1962  
1963 + # So?  What about this header?
1964 + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1965 +  yes:no: )
1966 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1967 + $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1968 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1969 + $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1970 +    ;;
1971 +  no:yes:* )
1972 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1973 + $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1974 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1975 + $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1976 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1977 + $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1978 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1979 + $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1980 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1981 + $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1982 + ( cat <<\_ASBOX
1983 + ## ------------------------------ ##
1984 + ## Report this to gezelter@nd.edu ##
1985 + ## ------------------------------ ##
1986 + _ASBOX
1987 +     ) | sed "s/^/$as_me: WARNING:     /" >&2
1988 +    ;;
1989 + esac
1990 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1991 + $as_echo_n "checking for $2... " >&6; }
1992 + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1993 +  $as_echo_n "(cached) " >&6
1994 + else
1995 +  eval "$3=\$ac_header_compiler"
1996 + fi
1997 + eval ac_res=\$$3
1998 +               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999 + $as_echo "$ac_res" >&6; }
2000 + fi
2001 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2002  
2003 + } # ac_fn_c_check_header_mongrel
2004  
2005 + # ac_fn_c_try_run LINENO
2006 + # ----------------------
2007 + # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2008 + # that executables *can* be run.
2009 + ac_fn_c_try_run ()
2010 + {
2011 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 +  if { { ac_try="$ac_link"
2013 + case "(($ac_try" in
2014 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2015 +  *) ac_try_echo=$ac_try;;
2016 + esac
2017 + eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2018 + $as_echo "$ac_try_echo"; } >&5
2019 +  (eval "$ac_link") 2>&5
2020 +  ac_status=$?
2021 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2022 +  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2023 +  { { case "(($ac_try" in
2024 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2025 +  *) ac_try_echo=$ac_try;;
2026 + esac
2027 + eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2028 + $as_echo "$ac_try_echo"; } >&5
2029 +  (eval "$ac_try") 2>&5
2030 +  ac_status=$?
2031 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2032 +  test $ac_status = 0; }; }; then :
2033 +  ac_retval=0
2034 + else
2035 +  $as_echo "$as_me: program exited with status $ac_status" >&5
2036 +       $as_echo "$as_me: failed program was:" >&5
2037 + sed 's/^/| /' conftest.$ac_ext >&5
2038  
2039 +       ac_retval=$ac_status
2040 + fi
2041 +  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2042 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2043 +  as_fn_set_status $ac_retval
2044  
2045 + } # ac_fn_c_try_run
2046  
2047 + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2048 + # -------------------------------------------------------
2049 + # Tests whether HEADER exists and can be compiled using the include files in
2050 + # INCLUDES, setting the cache variable VAR accordingly.
2051 + ac_fn_c_check_header_compile ()
2052 + {
2053 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2054 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2055 + $as_echo_n "checking for $2... " >&6; }
2056 + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2057 +  $as_echo_n "(cached) " >&6
2058 + else
2059 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060 + /* end confdefs.h.  */
2061 + $4
2062 + #include <$2>
2063 + _ACEOF
2064 + if ac_fn_c_try_compile "$LINENO"; then :
2065 +  eval "$3=yes"
2066 + else
2067 +  eval "$3=no"
2068 + fi
2069 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2070 + fi
2071 + eval ac_res=\$$3
2072 +               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2073 + $as_echo "$ac_res" >&6; }
2074 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2075  
2076 + } # ac_fn_c_check_header_compile
2077  
2078 <
2079 <
2080 < ac_aux_dir=
2081 < for ac_dir in ac-tools $srcdir/ac-tools; do
2082 <  if test -f $ac_dir/install-sh; then
2083 <    ac_aux_dir=$ac_dir
2084 <    ac_install_sh="$ac_aux_dir/install-sh -c"
2085 <    break
2086 <  elif test -f $ac_dir/install.sh; then
2087 <    ac_aux_dir=$ac_dir
2088 <    ac_install_sh="$ac_aux_dir/install.sh -c"
2089 <    break
2090 <  elif test -f $ac_dir/shtool; then
2091 <    ac_aux_dir=$ac_dir
2092 <    ac_install_sh="$ac_aux_dir/shtool install -c"
2093 <    break
2078 > # ac_fn_cxx_try_cpp LINENO
2079 > # ------------------------
2080 > # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2081 > ac_fn_cxx_try_cpp ()
2082 > {
2083 >  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2084 >  if { { ac_try="$ac_cpp conftest.$ac_ext"
2085 > case "(($ac_try" in
2086 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2087 >  *) ac_try_echo=$ac_try;;
2088 > esac
2089 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2090 > $as_echo "$ac_try_echo"; } >&5
2091 >  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2092 >  ac_status=$?
2093 >  if test -s conftest.err; then
2094 >    grep -v '^ *+' conftest.err >conftest.er1
2095 >    cat conftest.er1 >&5
2096 >    mv -f conftest.er1 conftest.err
2097    fi
2098 < done
2099 < if test -z "$ac_aux_dir"; then
2100 <  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ac-tools $srcdir/ac-tools" >&5
2101 < echo "$as_me: error: cannot find install-sh or install.sh in ac-tools $srcdir/ac-tools" >&2;}
2102 <   { (exit 1); exit 1; }; }
2098 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2099 >  test $ac_status = 0; } >/dev/null && {
2100 >         test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2101 >         test ! -s conftest.err
2102 >       }; then :
2103 >  ac_retval=0
2104 > else
2105 >  $as_echo "$as_me: failed program was:" >&5
2106 > sed 's/^/| /' conftest.$ac_ext >&5
2107 >
2108 >    ac_retval=1
2109   fi
2110 < ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2111 < ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1364 < ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2110 >  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2111 >  as_fn_set_status $ac_retval
2112  
2113 + } # ac_fn_cxx_try_cpp
2114  
2115 < # This file is part of Autoconf.                       -*- Autoconf -*-
2116 < # Programming languages support.
2117 < # Copyright 2000, 2001
2118 < # Free Software Foundation, Inc.
2119 < #
2120 < # This program is free software; you can redistribute it and/or modify
2121 < # it under the terms of the GNU General Public License as published by
2122 < # the Free Software Foundation; either version 2, or (at your option)
2123 < # any later version.
2124 < #
2125 < # This program is distributed in the hope that it will be useful,
2126 < # but WITHOUT ANY WARRANTY; without even the implied warranty of
2127 < # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2128 < # GNU General Public License for more details.
2129 < #
2130 < # You should have received a copy of the GNU General Public License
2131 < # along with this program; if not, write to the Free Software
2132 < # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2133 < # 02111-1307, USA.
2134 < #
2135 < # As a special exception, the Free Software Foundation gives unlimited
2136 < # permission to copy, distribute and modify the configure scripts that
2137 < # are the output of Autoconf.  You need not follow the terms of the GNU
2138 < # General Public License when using or distributing such scripts, even
2139 < # though portions of the text of Autoconf appear in them.  The GNU
2140 < # General Public License (GPL) does govern all other use of the material
2141 < # that constitutes the Autoconf program.
2142 < #
2143 < # Certain portions of the Autoconf source text are designed to be copied
2144 < # (in certain cases, depending on the input) into the output of
2145 < # Autoconf.  We call these the "data" portions.  The rest of the Autoconf
2146 < # source text consists of comments plus executable code that decides which
2147 < # of the data portions to output in any given case.  We call these
2148 < # comments and executable code the "non-data" portions.  Autoconf never
1401 < # copies any of the non-data portions into its output.
1402 < #
1403 < # This special exception to the GPL applies to versions of Autoconf
1404 < # released by the Free Software Foundation.  When you make and
1405 < # distribute a modified version of Autoconf, you may extend this special
1406 < # exception to the GPL to apply to your modified version as well, *unless*
1407 < # your modified version has the potential to copy into its output some
1408 < # of the text that was the non-data portion of the version that you started
1409 < # with.  (In other words, unless your change moves or copies text from
1410 < # the non-data portions to the data portions.)  If your modification has
1411 < # such potential, you must delete any notice of this special exception
1412 < # to the GPL from your modified version.
1413 < #
1414 < # Written by Akim Demaille, Christian Marquardt, Martin Wilks (and probably
1415 < # many others).
2115 > # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2116 > # ---------------------------------------------------------
2117 > # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2118 > # the include files in INCLUDES and setting the cache variable VAR
2119 > # accordingly.
2120 > ac_fn_cxx_check_header_mongrel ()
2121 > {
2122 >  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2123 >  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2124 >  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2125 > $as_echo_n "checking for $2... " >&6; }
2126 > if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2127 >  $as_echo_n "(cached) " >&6
2128 > fi
2129 > eval ac_res=\$$3
2130 >               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2131 > $as_echo "$ac_res" >&6; }
2132 > else
2133 >  # Is the header compilable?
2134 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2135 > $as_echo_n "checking $2 usability... " >&6; }
2136 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137 > /* end confdefs.h.  */
2138 > $4
2139 > #include <$2>
2140 > _ACEOF
2141 > if ac_fn_cxx_try_compile "$LINENO"; then :
2142 >  ac_header_compiler=yes
2143 > else
2144 >  ac_header_compiler=no
2145 > fi
2146 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2148 > $as_echo "$ac_header_compiler" >&6; }
2149  
2150 + # Is the header present?
2151 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2152 + $as_echo_n "checking $2 presence... " >&6; }
2153 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154 + /* end confdefs.h.  */
2155 + #include <$2>
2156 + _ACEOF
2157 + if ac_fn_cxx_try_cpp "$LINENO"; then :
2158 +  ac_header_preproc=yes
2159 + else
2160 +  ac_header_preproc=no
2161 + fi
2162 + rm -f conftest.err conftest.$ac_ext
2163 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2164 + $as_echo "$ac_header_preproc" >&6; }
2165  
2166 < # Table of Contents:
2167 < #
2168 < # 1. Language selection
2169 < #    and routines to produce programs in a given language.
2170 < #  a. Fortran 77 (to be moved from aclang.m4)
2171 < #  b. Fortran 90
2172 < #  c. Fortran 95
2173 < #
2174 < # 2. Producing programs in a given language.
2175 < #  a. Fortran 77 (to be moved from aclang.m4)
2176 < #  b. Fortran 90
2177 < #  c. Fortran 95
2178 < #
2179 < # 3. Looking for a compiler
2180 < #    And possibly the associated preprocessor.
2181 < #  a. Fortran 77 (to be moved from aclang.m4)
2182 < #  b. Fortran 90
2183 < #  c. Fortran 95
2184 < #
2185 < # 4. Compilers' characteristics.
2186 < #  a. Fortran 77 (to be moved from aclang.m4)
2187 < #  b. Fortran 90
2188 < #  c. Fortran 95
2166 > # So?  What about this header?
2167 > case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2168 >  yes:no: )
2169 >    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2170 > $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2171 >    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2172 > $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2173 >    ;;
2174 >  no:yes:* )
2175 >    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2176 > $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2177 >    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2178 > $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2179 >    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2180 > $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2181 >    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2182 > $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2183 >    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2184 > $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2185 > ( cat <<\_ASBOX
2186 > ## ------------------------------ ##
2187 > ## Report this to gezelter@nd.edu ##
2188 > ## ------------------------------ ##
2189 > _ASBOX
2190 >     ) | sed "s/^/$as_me: WARNING:     /" >&2
2191 >    ;;
2192 > esac
2193 >  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2194 > $as_echo_n "checking for $2... " >&6; }
2195 > if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2196 >  $as_echo_n "(cached) " >&6
2197 > else
2198 >  eval "$3=\$ac_header_compiler"
2199 > fi
2200 > eval ac_res=\$$3
2201 >               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2202 > $as_echo "$ac_res" >&6; }
2203 > fi
2204 >  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2205  
2206 < # _AC_LIST_MEMBER_IF(ELEMENT, LIST, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1443 < # ---------------------------------------------------------------------------
1444 < #
1445 < # Processing the elements of a list is tedious in shell programming,
1446 < # as lists tend to be implemented as space delimited strings.
1447 < #
1448 < # This macro searches LIST for ELEMENT, and executes ACTION-IF-FOUND
1449 < # if ELEMENT is a member of LIST, otherwise it executes
1450 < # ACTION-IF-NOT-FOUND.
1451 < # _AC_LIST_MEMBER_IF
2206 > } # ac_fn_cxx_check_header_mongrel
2207  
2208 + # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2209 + # -------------------------------------------
2210 + # Tests whether TYPE exists after having included INCLUDES, setting cache
2211 + # variable VAR accordingly.
2212 + ac_fn_c_check_type ()
2213 + {
2214 +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2215 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2216 + $as_echo_n "checking for $2... " >&6; }
2217 + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2218 +  $as_echo_n "(cached) " >&6
2219 + else
2220 +  eval "$3=no"
2221 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2222 + /* end confdefs.h.  */
2223 + $4
2224 + #ifdef FC_DUMMY_MAIN
2225 + #ifndef FC_DUMMY_MAIN_EQ_F77
2226 + #  ifdef __cplusplus
2227 +     extern "C"
2228 + #  endif
2229 +   int FC_DUMMY_MAIN() { return 1; }
2230 + #endif
2231 + #endif
2232 + int
2233 + main ()
2234 + {
2235 + if (sizeof ($2))
2236 +         return 0;
2237 +  ;
2238 +  return 0;
2239 + }
2240 + _ACEOF
2241 + if ac_fn_c_try_compile "$LINENO"; then :
2242 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243 + /* end confdefs.h.  */
2244 + $4
2245 + #ifdef FC_DUMMY_MAIN
2246 + #ifndef FC_DUMMY_MAIN_EQ_F77
2247 + #  ifdef __cplusplus
2248 +     extern "C"
2249 + #  endif
2250 +   int FC_DUMMY_MAIN() { return 1; }
2251 + #endif
2252 + #endif
2253 + int
2254 + main ()
2255 + {
2256 + if (sizeof (($2)))
2257 +            return 0;
2258 +  ;
2259 +  return 0;
2260 + }
2261 + _ACEOF
2262 + if ac_fn_c_try_compile "$LINENO"; then :
2263  
2264 + else
2265 +  eval "$3=yes"
2266 + fi
2267 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2268 + fi
2269 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270 + fi
2271 + eval ac_res=\$$3
2272 +               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2273 + $as_echo "$ac_res" >&6; }
2274 +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2275  
2276 < # _AC_LINKER_OPTION(LINKER-OPTIONS, SHELL-VARIABLE)
2277 < # -------------------------------------------------
2278 < #
2279 < # Specifying options to the compiler (whether it be the C, C++ or
1459 < # Fortran 77 compiler) that are meant for the linker is compiler
1460 < # dependent.  This macro lets you give options to the compiler that
1461 < # are meant for the linker in a portable, compiler-independent way.
1462 < #
1463 < # This macro take two arguments, a list of linker options that the
1464 < # compiler should pass to the linker (LINKER-OPTIONS) and the name of
1465 < # a shell variable (SHELL-VARIABLE).  The list of linker options are
1466 < # appended to the shell variable in a compiler-dependent way.
1467 < #
1468 < # For example, if the selected language is C, then this:
1469 < #
1470 < #   _AC_LINKER_OPTION([-R /usr/local/lib/foo], foo_LDFLAGS)
1471 < #
1472 < # will expand into this if the selected C compiler is gcc:
1473 < #
1474 < #   foo_LDFLAGS="-Xlinker -R -Xlinker /usr/local/lib/foo"
1475 < #
1476 < # otherwise, it will expand into this:
1477 < #
1478 < #   foo_LDFLAGS"-R /usr/local/lib/foo"
1479 < #
1480 < # You are encouraged to add support for compilers that this macro
1481 < # doesn't currently support.
1482 < # FIXME: Get rid of this macro.
1483 < # _AC_LINKER_OPTION
2276 > } # ac_fn_c_check_type
2277 > cat >config.log <<_ACEOF
2278 > This file contains any messages produced by compilers while
2279 > running configure, to aid debugging if configure makes a mistake.
2280  
2281 + It was created by OpenMD $as_me 1.0, which was
2282 + generated by GNU Autoconf 2.65.  Invocation command line was
2283  
2284 +  $ $0 $@
2285  
2286 < ## ----------------------- ##
2287 < ## 1. Language selection.  ##
2288 < ## ----------------------- ##
2286 > _ACEOF
2287 > exec 5>>config.log
2288 > {
2289 > cat <<_ASUNAME
2290 > ## --------- ##
2291 > ## Platform. ##
2292 > ## --------- ##
2293  
2294 < # ----------------------------- #
2295 < # 1b. The Fortran 90 language.  #
2296 < # ----------------------------- #
2294 > hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2295 > uname -m = `(uname -m) 2>/dev/null || echo unknown`
2296 > uname -r = `(uname -r) 2>/dev/null || echo unknown`
2297 > uname -s = `(uname -s) 2>/dev/null || echo unknown`
2298 > uname -v = `(uname -v) 2>/dev/null || echo unknown`
2299  
2300 < # AC_LANG(Fortran 90)
2301 < # -------------------
2300 > /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2301 > /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2302  
2303 + /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2304 + /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2305 + /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2306 + /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2307 + /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2308 + /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2309 + /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2310  
2311 + _ASUNAME
2312  
2313 < # _AC_LANG_ABBREV(Fortran 90)
2314 < # ---------------------------
2313 > as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2314 > for as_dir in $PATH
2315 > do
2316 >  IFS=$as_save_IFS
2317 >  test -z "$as_dir" && as_dir=.
2318 >    $as_echo "PATH: $as_dir"
2319 >  done
2320 > IFS=$as_save_IFS
2321  
2322 + } >&5
2323  
2324 + cat >&5 <<_ACEOF
2325  
1505 # ----------------------------- #
1506 # 1c. The Fortran 95 language.  #
1507 # ----------------------------- #
2326  
2327 < # AC_LANG(Fortran 95)
2328 < # -------------------
2327 > ## ----------- ##
2328 > ## Core tests. ##
2329 > ## ----------- ##
2330  
2331 + _ACEOF
2332  
2333  
2334 < # _AC_LANG_ABBREV(Fortran 95)
2335 < # ---------------------------
2334 > # Keep a trace of the command line.
2335 > # Strip out --no-create and --no-recursion so they do not pile up.
2336 > # Strip out --silent because we don't want to record it for future runs.
2337 > # Also quote any args containing shell meta-characters.
2338 > # Make two passes to allow for proper duplicate-argument suppression.
2339 > ac_configure_args=
2340 > ac_configure_args0=
2341 > ac_configure_args1=
2342 > ac_must_keep_next=false
2343 > for ac_pass in 1 2
2344 > do
2345 >  for ac_arg
2346 >  do
2347 >    case $ac_arg in
2348 >    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2349 >    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2350 >    | -silent | --silent | --silen | --sile | --sil)
2351 >      continue ;;
2352 >    *\'*)
2353 >      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2354 >    esac
2355 >    case $ac_pass in
2356 >    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2357 >    2)
2358 >      as_fn_append ac_configure_args1 " '$ac_arg'"
2359 >      if test $ac_must_keep_next = true; then
2360 >        ac_must_keep_next=false # Got value, back to normal.
2361 >      else
2362 >        case $ac_arg in
2363 >          *=* | --config-cache | -C | -disable-* | --disable-* \
2364 >          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2365 >          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2366 >          | -with-* | --with-* | -without-* | --without-* | --x)
2367 >            case "$ac_configure_args0 " in
2368 >              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2369 >            esac
2370 >            ;;
2371 >          -* ) ac_must_keep_next=true ;;
2372 >        esac
2373 >      fi
2374 >      as_fn_append ac_configure_args " '$ac_arg'"
2375 >      ;;
2376 >    esac
2377 >  done
2378 > done
2379 > { ac_configure_args0=; unset ac_configure_args0;}
2380 > { ac_configure_args1=; unset ac_configure_args1;}
2381  
2382 + # When interrupted or exit'd, cleanup temporary files, and complete
2383 + # config.log.  We remove comments because anyway the quotes in there
2384 + # would cause problems or look ugly.
2385 + # WARNING: Use '\'' to represent an apostrophe within the trap.
2386 + # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2387 + trap 'exit_status=$?
2388 +  # Save into config.log some information that might help in debugging.
2389 +  {
2390 +    echo
2391  
2392 +    cat <<\_ASBOX
2393 + ## ---------------- ##
2394 + ## Cache variables. ##
2395 + ## ---------------- ##
2396 + _ASBOX
2397 +    echo
2398 +    # The following way of writing the cache mishandles newlines in values,
2399 + (
2400 +  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2401 +    eval ac_val=\$$ac_var
2402 +    case $ac_val in #(
2403 +    *${as_nl}*)
2404 +      case $ac_var in #(
2405 +      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2406 + $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2407 +      esac
2408 +      case $ac_var in #(
2409 +      _ | IFS | as_nl) ;; #(
2410 +      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2411 +      *) { eval $ac_var=; unset $ac_var;} ;;
2412 +      esac ;;
2413 +    esac
2414 +  done
2415 +  (set) 2>&1 |
2416 +    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2417 +    *${as_nl}ac_space=\ *)
2418 +      sed -n \
2419 +        "s/'\''/'\''\\\\'\'''\''/g;
2420 +          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2421 +      ;; #(
2422 +    *)
2423 +      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2424 +      ;;
2425 +    esac |
2426 +    sort
2427 + )
2428 +    echo
2429  
2430 < ## ---------------------- ##
2431 < ## 2.Producing programs.  ##
2432 < ## ---------------------- ##
2430 >    cat <<\_ASBOX
2431 > ## ----------------- ##
2432 > ## Output variables. ##
2433 > ## ----------------- ##
2434 > _ASBOX
2435 >    echo
2436 >    for ac_var in $ac_subst_vars
2437 >    do
2438 >      eval ac_val=\$$ac_var
2439 >      case $ac_val in
2440 >      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2441 >      esac
2442 >      $as_echo "$ac_var='\''$ac_val'\''"
2443 >    done | sort
2444 >    echo
2445  
2446 < # ------------------------ #
2447 < # 2b. Fortran 90 sources.  #
2448 < # ------------------------ #
2446 >    if test -n "$ac_subst_files"; then
2447 >      cat <<\_ASBOX
2448 > ## ------------------- ##
2449 > ## File substitutions. ##
2450 > ## ------------------- ##
2451 > _ASBOX
2452 >      echo
2453 >      for ac_var in $ac_subst_files
2454 >      do
2455 >        eval ac_val=\$$ac_var
2456 >        case $ac_val in
2457 >        *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2458 >        esac
2459 >        $as_echo "$ac_var='\''$ac_val'\''"
2460 >      done | sort
2461 >      echo
2462 >    fi
2463  
2464 < # AC_LANG_SOURCE(Fortran 90)(BODY)
2465 < # --------------------------------
2464 >    if test -s confdefs.h; then
2465 >      cat <<\_ASBOX
2466 > ## ----------- ##
2467 > ## confdefs.h. ##
2468 > ## ----------- ##
2469 > _ASBOX
2470 >      echo
2471 >      cat confdefs.h
2472 >      echo
2473 >    fi
2474 >    test "$ac_signal" != 0 &&
2475 >      $as_echo "$as_me: caught signal $ac_signal"
2476 >    $as_echo "$as_me: exit $exit_status"
2477 >  } >&5
2478 >  rm -f core *.core core.conftest.* &&
2479 >    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2480 >    exit $exit_status
2481 > ' 0
2482 > for ac_signal in 1 2 13 15; do
2483 >  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2484 > done
2485 > ac_signal=0
2486  
2487 + # confdefs.h avoids OS command line length limits that DEFS can exceed.
2488 + rm -f -r conftest* confdefs.h
2489  
2490 + $as_echo "/* confdefs.h */" > confdefs.h
2491  
2492 < # AC_LANG_PROGRAM(Fortran 90)([PROLOGUE], [BODY])
1533 < # -----------------------------------------------
2492 > # Predefined preprocessor variables.
2493  
2494 + cat >>confdefs.h <<_ACEOF
2495 + #define PACKAGE_NAME "$PACKAGE_NAME"
2496 + _ACEOF
2497  
2498 < # AC_LANG_CALL(Fortran 90)(PROLOGUE, FUNCTION)
2499 < # --------------------------------------------
2498 > cat >>confdefs.h <<_ACEOF
2499 > #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2500 > _ACEOF
2501  
2502 + cat >>confdefs.h <<_ACEOF
2503 + #define PACKAGE_VERSION "$PACKAGE_VERSION"
2504 + _ACEOF
2505  
2506 + cat >>confdefs.h <<_ACEOF
2507 + #define PACKAGE_STRING "$PACKAGE_STRING"
2508 + _ACEOF
2509  
2510 < # ------------------------ #
2511 < # 2c. Fortran 95 sources.  #
2512 < # ------------------------ #
2510 > cat >>confdefs.h <<_ACEOF
2511 > #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2512 > _ACEOF
2513  
2514 < # AC_LANG_SOURCE(Fortran 95)(BODY)
2515 < # --------------------------------
2514 > cat >>confdefs.h <<_ACEOF
2515 > #define PACKAGE_URL "$PACKAGE_URL"
2516 > _ACEOF
2517  
2518  
2519 < # AC_LANG_PROGRAM(Fortran 95)([PROLOGUE], [BODY])
2520 < # -----------------------------------------------
2519 > # Let the site file select an alternate cache file if it wants to.
2520 > # Prefer an explicitly selected file to automatically selected ones.
2521 > ac_site_file1=NONE
2522 > ac_site_file2=NONE
2523 > if test -n "$CONFIG_SITE"; then
2524 >  ac_site_file1=$CONFIG_SITE
2525 > elif test "x$prefix" != xNONE; then
2526 >  ac_site_file1=$prefix/share/config.site
2527 >  ac_site_file2=$prefix/etc/config.site
2528 > else
2529 >  ac_site_file1=$ac_default_prefix/share/config.site
2530 >  ac_site_file2=$ac_default_prefix/etc/config.site
2531 > fi
2532 > for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2533 > do
2534 >  test "x$ac_site_file" = xNONE && continue
2535 >  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2536 >    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2537 > $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2538 >    sed 's/^/| /' "$ac_site_file" >&5
2539 >    . "$ac_site_file"
2540 >  fi
2541 > done
2542  
2543 + if test -r "$cache_file"; then
2544 +  # Some versions of bash will fail to source /dev/null (special files
2545 +  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2546 +  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2547 +    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2548 + $as_echo "$as_me: loading cache $cache_file" >&6;}
2549 +    case $cache_file in
2550 +      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2551 +      *)                      . "./$cache_file";;
2552 +    esac
2553 +  fi
2554 + else
2555 +  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2556 + $as_echo "$as_me: creating cache $cache_file" >&6;}
2557 +  >$cache_file
2558 + fi
2559  
2560 < # AC_LANG_CALL(Fortran 95)(PROLOGUE, FUNCTION)
2561 < # --------------------------------------------
2560 > # Check that the precious variables saved in the cache have kept the same
2561 > # value.
2562 > ac_cache_corrupted=false
2563 > for ac_var in $ac_precious_vars; do
2564 >  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2565 >  eval ac_new_set=\$ac_env_${ac_var}_set
2566 >  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2567 >  eval ac_new_val=\$ac_env_${ac_var}_value
2568 >  case $ac_old_set,$ac_new_set in
2569 >    set,)
2570 >      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2571 > $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2572 >      ac_cache_corrupted=: ;;
2573 >    ,set)
2574 >      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2575 > $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2576 >      ac_cache_corrupted=: ;;
2577 >    ,);;
2578 >    *)
2579 >      if test "x$ac_old_val" != "x$ac_new_val"; then
2580 >        # differences in whitespace do not lead to failure.
2581 >        ac_old_val_w=`echo x $ac_old_val`
2582 >        ac_new_val_w=`echo x $ac_new_val`
2583 >        if test "$ac_old_val_w" != "$ac_new_val_w"; then
2584 >          { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2585 > $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2586 >          ac_cache_corrupted=:
2587 >        else
2588 >          { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2589 > $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2590 >          eval $ac_var=\$ac_old_val
2591 >        fi
2592 >        { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2593 > $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2594 >        { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2595 > $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2596 >      fi;;
2597 >  esac
2598 >  # Pass precious variables to config.status.
2599 >  if test "$ac_new_set" = set; then
2600 >    case $ac_new_val in
2601 >    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2602 >    *) ac_arg=$ac_var=$ac_new_val ;;
2603 >    esac
2604 >    case " $ac_configure_args " in
2605 >      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2606 >      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2607 >    esac
2608 >  fi
2609 > done
2610 > if $ac_cache_corrupted; then
2611 >  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2612 > $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2613 >  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2614 > $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2615 >  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2616 > fi
2617 > ## -------------------- ##
2618 > ## Main body of script. ##
2619 > ## -------------------- ##
2620  
2621 + ac_ext=c
2622 + ac_cpp='$CPP $CPPFLAGS'
2623 + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2624 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2625 + ac_compiler_gnu=$ac_cv_c_compiler_gnu
2626  
2627  
2628 < ## -------------------------------------------- ##
2629 < ## 3. Looking for Compilers and Preprocessors.  ##
2630 < ## -------------------------------------------- ##
2628 > ac_aux_dir=
2629 > for ac_dir in ac-tools "$srcdir"/ac-tools; do
2630 >  for ac_t in install-sh install.sh shtool; do
2631 >    if test -f "$ac_dir/$ac_t"; then
2632 >      ac_aux_dir=$ac_dir
2633 >      ac_install_sh="$ac_aux_dir/$ac_t -c"
2634 >      break 2
2635 >    fi
2636 >  done
2637 > done
2638 > if test -z "$ac_aux_dir"; then
2639 >  as_fn_error "cannot find install-sh, install.sh, or shtool in ac-tools \"$srcdir\"/ac-tools" "$LINENO" 5
2640 > fi
2641  
2642 < # ----------------------------- #
2643 < # 3b. The Fortran 90 compiler.  #
2644 < # ----------------------------- #
2642 > # These three variables are undocumented and unsupported,
2643 > # and are intended to be withdrawn in a future Autoconf release.
2644 > # They can cause serious problems if a builder's source tree is in a directory
2645 > # whose full name contains unusual characters.
2646 > ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2647 > ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2648 > ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2649  
2650  
1567 # AC_LANG_PREPROC(Fortran 90)
1568 # ---------------------------
1569 # Find the Fortran 90 preprocessor.  Must be AC_DEFUN'd to be AC_REQUIRE'able.
2651  
2652 + ac_config_headers="$ac_config_headers src/config.h"
2653  
2654  
1573 # AC_LANG_COMPILER(Fortran 90)
1574 # ----------------------------
1575 # Find the Fortran 90 compiler.  Must be AC_DEFUN'd to be
1576 # AC_REQUIRE'able.
2655  
2656  
2657  
1580 # AC_PROG_F90([COMPILERS...])
1581 # ---------------------------
1582 # COMPILERS is a space separated list of Fortran 90 compilers to search
1583 # for.
1584 #
1585 # Compilers are ordered by
1586 #  1. F90, F95
1587 #  2. Good/tested native compilers, bad/untested native compilers
1588 #
1589 # pgf90 is the Portland Group F90 compilers.
1590 # xlf90/xlf95 are IBM (AIX) F90/F95 compilers.
1591 # lf95 is the Lahey-Fujitsu compiler.
1592 # epcf90 is the "Edinburgh Portable Compiler" F90.
1593 # fort is the Compaq Fortran 90 (now 95) compiler for Tru64 and Linux/Alpha.
1594 # AC_PROG_F90
2658  
2659  
1597 # ----------------------------- #
1598 # 3c. The Fortran 95 compiler.  #
1599 # ----------------------------- #
2660  
2661  
1602 # AC_LANG_PREPROC(Fortran 95)
1603 # ---------------------------
1604 # Find the Fortran 95 preprocessor.  Must be AC_DEFUN'd to be AC_REQUIRE'able.
2662  
2663  
2664  
1608 # AC_LANG_COMPILER(Fortran 95)
1609 # ----------------------------
1610 # Find the Fortran 95 compiler.  Must be AC_DEFUN'd to be
1611 # AC_REQUIRE'able.
2665  
2666  
2667  
1615 # AC_PROG_F95([COMPILERS...])
1616 # ---------------------------
1617 # COMPILERS is a space separated list of Fortran 95 compilers to search
1618 # for.
1619 #
1620 # Compilers are ordered by
1621 #  1. Good/tested native compilers, bad/untested native compilers
1622 #
1623 # xlf95 is the IBM (AIX) F95 compiler.
1624 # lf95 is the Lahey-Fujitsu compiler.
1625 # fort is the Compaq Fortran 90 (now 95) compiler for Tru64 and Linux/Alpha.
1626 # AC_PROG_F95
2668  
2669  
1629 ## ------------------------------- ##
1630 ## 4. Compilers' characteristics.  ##
1631 ## ------------------------------- ##
2670  
2671  
1634 # ---------------------------------------- #
1635 # 4b. Fortan 90 compiler characteristics.  #
1636 # ---------------------------------------- #
2672  
2673  
1639 # _AC_PROG_F90_V_OUTPUT([FLAG = $ac_cv_prog_f90_v])
1640 # -------------------------------------------------
1641 # Link a trivial Fortran program, compiling with a verbose output FLAG
1642 # (which default value, $ac_cv_prog_f90_v, is computed by
1643 # _AC_PROG_F90_V), and return the output in $ac_f90_v_output.  This
1644 # output is processed in the way expected by AC_F90_LIBRARY_LDFLAGS,
1645 # so that any link flags that are echoed by the compiler appear as
1646 # space-separated items.
1647 # _AC_PROG_F90_V_OUTPUT
2674  
2675  
1650 # _AC_PROG_F90_V
1651 # --------------
1652 #
1653 # Determine the flag that causes the Fortran 90 compiler to print
1654 # information of library and object files (normally -v)
1655 # Needed for AC_F90_LIBRARY_FLAGS
1656 # Some compilers don't accept -v (Lahey: -verbose, xlf: -V, Fujitsu: -###)
1657 # _AC_PROG_F90_V
2676  
2677  
1660 # AC_F90_LIBRARY_LDFLAGS
1661 # ----------------------
1662 #
1663 # Determine the linker flags (e.g. "-L" and "-l") for the Fortran 90
1664 # intrinsic and run-time libraries that are required to successfully
1665 # link a Fortran 90 program or shared library.  The output variable
1666 # F90LIBS is set to these flags.
1667 #
1668 # This macro is intended to be used in those situations when it is
1669 # necessary to mix, e.g. C++ and Fortran 90, source code into a single
1670 # program or shared library.
1671 #
1672 # For example, if object files from a C++ and Fortran 90 compiler must
1673 # be linked together, then the C++ compiler/linker must be used for
1674 # linking (since special C++-ish things need to happen at link time
1675 # like calling global constructors, instantiating templates, enabling
1676 # exception support, etc.).
1677 #
1678 # However, the Fortran 90 intrinsic and run-time libraries must be
1679 # linked in as well, but the C++ compiler/linker doesn't know how to
1680 # add these Fortran 90 libraries.  Hence, the macro
1681 # "AC_F90_LIBRARY_LDFLAGS" was created to determine these Fortran 90
1682 # libraries.
1683 #
1684 # This macro was copied from the Fortran 77 version by Matthew D. Langston.
1685 # AC_F90_LIBRARY_LDFLAGS
2678  
2679  
1688 # _AC_F90_NAME_MANGLING
1689 # ---------------------
1690 # Test for the name mangling scheme used by the Fortran 90 compiler.
1691 #
1692 # Sets ac_cv_f90_mangling. The value contains three fields, separated
1693 # by commas:
1694 #
1695 # lower case / upper case:
1696 #    case translation of the Fortan 90 symbols
1697 # underscore / no underscore:
1698 #    whether the compiler appends "_" to symbol names
1699 # extra underscore / no extra underscore:
1700 #    whether the compiler appends an extra "_" to symbol names already
1701 #    containing at least one underscore
1702 #
1703 # _AC_F90_NAME_MANGLING
2680  
1705 # The replacement is empty.
2681  
2682  
2683  
1709 # AC_F90_WRAPPERS
1710 # ---------------
1711 # Defines C macros F90_FUNC(name,NAME) and F90_FUNC_(name,NAME) to
1712 # properly mangle the names of C identifiers, and C identifiers with
1713 # underscores, respectively, so that they match the name mangling
1714 # scheme used by the Fortran 90 compiler.
1715 # AC_F90_WRAPPERS
2684  
2685  
1718 # AC_F90_FUNC(NAME, [SHELLVAR = NAME])
1719 # ------------------------------------
1720 # For a Fortran subroutine of given NAME, define a shell variable
1721 # $SHELLVAR to the Fortran 90 mangled name.  If the SHELLVAR
1722 # argument is not supplied, it defaults to NAME.
1723 # AC_F90_FUNC
2686  
2687  
1726 # ---------------------------------------- #
1727 # 4c. Fortan 95 compiler characteristics.  #
1728 # ---------------------------------------- #
2688  
2689  
1731 # _AC_PROG_F95_V_OUTPUT([FLAG = $ac_cv_prog_f95_v])
1732 # -------------------------------------------------
1733 # Link a trivial Fortran program, compiling with a verbose output FLAG
1734 # (which default value, $ac_cv_prog_f95_v, is computed by
1735 # _AC_PROG_F95_V), and return the output in $ac_f95_v_output.  This
1736 # output is processed in the way expected by AC_F95_LIBRARY_LDFLAGS,
1737 # so that any link flags that are echoed by the compiler appear as
1738 # space-separated items.
1739 # _AC_PROG_F95_V_OUTPUT
2690  
2691  
1742 # _AC_PROG_F95_V
1743 # --------------
1744 #
1745 # Determine the flag that causes the Fortran 95 compiler to print
1746 # information of library and object files (normally -v)
1747 # Needed for AC_F95_LIBRARY_FLAGS
1748 # Some compilers don't accept -v (Lahey: -verbose, xlf: -V, Fujitsu: -###)
1749 # _AC_PROG_F95_V
2692  
2693  
2694 < # AC_F95_LIBRARY_LDFLAGS
2695 < # ----------------------
2694 >
2695 >
2696 >
2697   #
1755 # Determine the linker flags (e.g. "-L" and "-l") for the Fortran 95
1756 # intrinsic and run-time libraries that are required to successfully
1757 # link a Fortran 95 program or shared library.  The output variable
1758 # F95LIBS is set to these flags.
2698   #
1760 # This macro is intended to be used in those situations when it is
1761 # necessary to mix, e.g. C++ and Fortran 95, source code into a single
1762 # program or shared library.
2699   #
1764 # For example, if object files from a C++ and Fortran 95 compiler must
1765 # be linked together, then the C++ compiler/linker must be used for
1766 # linking (since special C++-ish things need to happen at link time
1767 # like calling global constructors, instantiating templates, enabling
1768 # exception support, etc.).
1769 #
1770 # However, the Fortran 95 intrinsic and run-time libraries must be
1771 # linked in as well, but the C++ compiler/linker doesn't know how to
1772 # add these Fortran 95 libraries.  Hence, the macro
1773 # "AC_F95_LIBRARY_LDFLAGS" was created to determine these Fortran 95
1774 # libraries.
1775 #
1776 # This macro was copied from the Fortran 77 version by Matthew D. Langston.
1777 # AC_F95_LIBRARY_LDFLAGS
2700  
2701  
1780 # _AC_F95_NAME_MANGLING
1781 # ---------------------
1782 # Test for the name mangling scheme used by the Fortran 95 compiler.
1783 #
1784 # Sets ac_cv_f95_mangling. The value contains three fields, separated
1785 # by commas:
1786 #
1787 # lower case / upper case:
1788 #    case translation of the Fortan 95 symbols
1789 # underscore / no underscore:
1790 #    whether the compiler appends "_" to symbol names
1791 # extra underscore / no extra underscore:
1792 #    whether the compiler appends an extra "_" to symbol names already
1793 #    containing at least one underscore
1794 #
1795 # _AC_F95_NAME_MANGLING
2702  
1797 # The replacement is empty.
2703  
2704  
2705  
1801 # AC_F95_WRAPPERS
1802 # ---------------
1803 # Defines C macros F95_FUNC(name,NAME) and F95_FUNC_(name,NAME) to
1804 # properly mangle the names of C identifiers, and C identifiers with
1805 # underscores, respectively, so that they match the name mangling
1806 # scheme used by the Fortran 95 compiler.
1807 # AC_F95_WRAPPERS
2706  
2707  
1810 # AC_F95_FUNC(NAME, [SHELLVAR = NAME])
1811 # ------------------------------------
1812 # For a Fortran subroutine of given NAME, define a shell variable
1813 # $SHELLVAR to the Fortran 95 mangled name.  If the SHELLVAR
1814 # argument is not supplied, it defaults to NAME.
1815 # AC_F95_FUNC
2708  
2709 +
2710   # AC_F90_MODULE_NAMES
2711   # -------------------
2712   #
# Line 1876 | Line 2769 | ac_configure="$SHELL $ac_aux_dir/configure" # This sho
2769  
2770  
2771  
1879 # set program name
1880 PROGNAME="oopse"
2772  
2773  
1883 # there are two ways to do debugging.  One with the --enable-debug flag
1884 # and one using the DEBUG environment variable
2774  
1886 debug=0
1887 # Check whether --enable-debug or --disable-debug was given.
1888 if test "${enable_debug+set}" = set; then
1889  enableval="$enable_debug"
1890  debug=1
1891 fi;
1892 if test "${DEBUG}"; then
2775  
1894 cat >>confdefs.h <<\_ACEOF
1895 #define debug 1
1896 _ACEOF
2776  
1898  msg="$msg, debug mode"
1899 fi
2777  
2778  
2779 +
2780 +
2781 +
2782 +
2783 +
2784 +
2785 +
2786 +
2787 +
2788 +
2789 +
2790 +
2791 +
2792 +
2793 +
2794 +
2795 +
2796 +
2797 +
2798 +
2799 +
2800 +
2801 +
2802 +
2803 + # ===========================================================================
2804 + #             http://www.nongnu.org/autoconf-archive/ax_mpi.html
2805 + # ===========================================================================
2806 + #
2807 + # SYNOPSIS
2808 + #
2809 + #   AX_MPI([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
2810 + #
2811 + # DESCRIPTION
2812 + #
2813 + #   This macro tries to find out how to compile programs that use MPI
2814 + #   (Message Passing Interface), a standard API for parallel process
2815 + #   communication (see http://www-unix.mcs.anl.gov/mpi/)
2816 + #
2817 + #   On success, it sets the MPICC, MPICXX, MPIF77, or MPIFC output variable
2818 + #   to the name of the MPI compiler, depending upon the current language.
2819 + #   (This may just be $CC/$CXX/$F77/$FC, but is more often something like
2820 + #   mpicc/mpiCC/mpif77/mpif90.) It also sets MPILIBS to any libraries that
2821 + #   are needed for linking MPI (e.g. -lmpi or -lfmpi, if a special
2822 + #   MPICC/MPICXX/MPIF77/MPIFC was not found).
2823 + #
2824 + #   If you want to compile everything with MPI, you should set:
2825 + #
2826 + #       CC="MPICC" #OR# CXX="MPICXX" #OR# F77="MPIF77" #OR# FC="MPIFC"
2827 + #       LIBS="$MPILIBS $LIBS"
2828 + #
2829 + #   NOTE: The above assumes that you will use $CC (or whatever) for linking
2830 + #   as well as for compiling. (This is the default for automake and most
2831 + #   Makefiles.)
2832 + #
2833 + #   The user can force a particular library/compiler by setting the
2834 + #   MPICC/MPICXX/MPIF77/MPIFC and/or MPILIBS environment variables.
2835 + #
2836 + #   ACTION-IF-FOUND is a list of shell commands to run if an MPI library is
2837 + #   found, and ACTION-IF-NOT-FOUND is a list of commands to run if it is not
2838 + #   found. If ACTION-IF-FOUND is not specified, the default action will
2839 + #   define HAVE_MPI.
2840 + #
2841 + # LICENSE
2842 + #
2843 + #   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
2844 + #   Copyright (c) 2008 Julian C. Cummings <cummings@cacr.caltech.edu>
2845 + #
2846 + #   This program is free software: you can redistribute it and/or modify it
2847 + #   under the terms of the GNU General Public License as published by the
2848 + #   Free Software Foundation, either version 3 of the License, or (at your
2849 + #   option) any later version.
2850 + #
2851 + #   This program is distributed in the hope that it will be useful, but
2852 + #   WITHOUT ANY WARRANTY; without even the implied warranty of
2853 + #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
2854 + #   Public License for more details.
2855 + #
2856 + #   You should have received a copy of the GNU General Public License along
2857 + #   with this program. If not, see <http://www.gnu.org/licenses/>.
2858 + #
2859 + #   As a special exception, the respective Autoconf Macro's copyright owner
2860 + #   gives unlimited permission to copy, distribute and modify the configure
2861 + #   scripts that are the output of Autoconf when processing the Macro. You
2862 + #   need not follow the terms of the GNU General Public License when using
2863 + #   or distributing such scripts, even though portions of the text of the
2864 + #   Macro appear in them. The GNU General Public License (GPL) does govern
2865 + #   all other use of the material that constitutes the Autoconf Macro.
2866 + #
2867 + #   This special exception to the GPL applies to versions of the Autoconf
2868 + #   Macro released by the Autoconf Archive. When you make and distribute a
2869 + #   modified version of the Autoconf Macro, you may extend this special
2870 + #   exception to the GPL to apply to your modified version as well.
2871 +
2872 + # This is what autoupdate's m4 run will expand.  It fires
2873 + # the warning (with _au_warn_XXX), outputs it into the
2874 + # updated configure.ac (with AC_DIAGNOSE), and then outputs
2875 + # the replacement expansion.
2876 +
2877 +
2878 + # This is an auxiliary macro that is also run when
2879 + # autoupdate runs m4.  It simply calls m4_warning, but
2880 + # we need a wrapper so that each warning is emitted only
2881 + # once.  We break the quoting in m4_warning's argument in
2882 + # order to expand this macro's arguments, not AU_DEFUN's.
2883 +
2884 +
2885 + # Finally, this is the expansion that is picked up by
2886 + # autoconf.  It tells the user to run autoupdate, and
2887 + # then outputs the replacement expansion.  We do not care
2888 + # about autoupdate's warning because that contains
2889 + # information on what to do *after* running autoupdate.
2890 +
2891 +
2892 +
2893   # who am i
2894   # Make sure we can run config.sub.
2895 < $ac_config_sub sun4 >/dev/null 2>&1 ||
2896 <  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1906 < echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1907 <   { (exit 1); exit 1; }; }
2895 > $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2896 >  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2897  
2898 < echo "$as_me:$LINENO: checking build system type" >&5
2899 < echo $ECHO_N "checking build system type... $ECHO_C" >&6
2900 < if test "${ac_cv_build+set}" = set; then
2901 <  echo $ECHO_N "(cached) $ECHO_C" >&6
2898 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2899 > $as_echo_n "checking build system type... " >&6; }
2900 > if test "${ac_cv_build+set}" = set; then :
2901 >  $as_echo_n "(cached) " >&6
2902   else
2903 <  ac_cv_build_alias=$build_alias
2904 < test -z "$ac_cv_build_alias" &&
2905 <  ac_cv_build_alias=`$ac_config_guess`
2906 < test -z "$ac_cv_build_alias" &&
2907 <  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2908 < echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2909 <   { (exit 1); exit 1; }; }
1921 < ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1922 <  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1923 < echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1924 <   { (exit 1); exit 1; }; }
2903 >  ac_build_alias=$build_alias
2904 > test "x$ac_build_alias" = x &&
2905 >  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2906 > test "x$ac_build_alias" = x &&
2907 >  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
2908 > ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2909 >  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2910  
2911   fi
2912 < echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2913 < echo "${ECHO_T}$ac_cv_build" >&6
2912 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2913 > $as_echo "$ac_cv_build" >&6; }
2914 > case $ac_cv_build in
2915 > *-*-*) ;;
2916 > *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
2917 > esac
2918   build=$ac_cv_build
2919 < build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2920 < build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2921 < build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2919 > ac_save_IFS=$IFS; IFS='-'
2920 > set x $ac_cv_build
2921 > shift
2922 > build_cpu=$1
2923 > build_vendor=$2
2924 > shift; shift
2925 > # Remember, the first character of IFS is used to create $*,
2926 > # except with old shells:
2927 > build_os=$*
2928 > IFS=$ac_save_IFS
2929 > case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2930  
2931  
2932 < echo "$as_me:$LINENO: checking host system type" >&5
2933 < echo $ECHO_N "checking host system type... $ECHO_C" >&6
2934 < if test "${ac_cv_host+set}" = set; then
2935 <  echo $ECHO_N "(cached) $ECHO_C" >&6
2932 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2933 > $as_echo_n "checking host system type... " >&6; }
2934 > if test "${ac_cv_host+set}" = set; then :
2935 >  $as_echo_n "(cached) " >&6
2936   else
2937 <  ac_cv_host_alias=$host_alias
2938 < test -z "$ac_cv_host_alias" &&
2939 <  ac_cv_host_alias=$ac_cv_build_alias
2940 < ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2941 <  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2942 < echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1946 <   { (exit 1); exit 1; }; }
2937 >  if test "x$host_alias" = x; then
2938 >  ac_cv_host=$ac_cv_build
2939 > else
2940 >  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2941 >    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2942 > fi
2943  
2944   fi
2945 < echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2946 < echo "${ECHO_T}$ac_cv_host" >&6
2945 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2946 > $as_echo "$ac_cv_host" >&6; }
2947 > case $ac_cv_host in
2948 > *-*-*) ;;
2949 > *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
2950 > esac
2951   host=$ac_cv_host
2952 < host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2953 < host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2954 < host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2952 > ac_save_IFS=$IFS; IFS='-'
2953 > set x $ac_cv_host
2954 > shift
2955 > host_cpu=$1
2956 > host_vendor=$2
2957 > shift; shift
2958 > # Remember, the first character of IFS is used to create $*,
2959 > # except with old shells:
2960 > host_os=$*
2961 > IFS=$ac_save_IFS
2962 > case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2963  
2964  
2965  
2966  
2967  
2968 < ac_ext=c
2969 < ac_cpp='$CPP $CPPFLAGS'
2970 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2971 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2972 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
2973 < if test -n "$ac_tool_prefix"; then
2974 <  for ac_prog in icc xlc gcc cc
2968 > # set program name
2969 > PROGNAME="openmd"
2970 >
2971 >
2972 >
2973 >
2974 > OBJEXT=".$OBJEXT"
2975 >
2976 > OPENMD=openmd
2977 >
2978 > if test "x${prefix}" = "xNONE"
2979 > then
2980 >  OPENMD_HOME=${ac_default_prefix}/openmd
2981 > else
2982 >  OPENMD_HOME=${prefix}/openmd
2983 > fi
2984 > # Check whether --enable-openmd-home was given.
2985 > if test "${enable_openmd_home+set}" = set; then :
2986 >  enableval=$enable_openmd_home; OPENMD_HOME="${enableval}"
2987 > fi
2988 >
2989 >
2990 > # there are two ways to do debugging.  One with the --enable-debug flag
2991 > # and one using the DEBUG environment variable
2992 >
2993 > debug=0
2994 > # Check whether --enable-debug was given.
2995 > if test "${enable_debug+set}" = set; then :
2996 >  enableval=$enable_debug; debug=1
2997 > fi
2998 >
2999 > if test "${DEBUG}"; then
3000 >
3001 > $as_echo "#define debug 1" >>confdefs.h
3002 >
3003 >  msg="$msg, debug mode"
3004 > fi
3005 >
3006 >
3007 > # Check whether --enable-single was given.
3008 > if test "${enable_single+set}" = set; then :
3009 >  enableval=$enable_single; ok=$enableval
3010 > else
3011 >  ok=no
3012 > fi
3013 >
3014 > # Check whether --enable-float was given.
3015 > if test "${enable_float+set}" = set; then :
3016 >  enableval=$enable_float; ok=$enableval
3017 > fi
3018 >
3019 > if test "$ok" = "yes"; then
3020 >
3021 > $as_echo "#define SINGLE_PRECISION 1" >>confdefs.h
3022 >
3023 >        USE_SINGLE_PRECISION=yes
3024 >
3025 > fi
3026 >
3027 > ac_ext=cpp
3028 > ac_cpp='$CXXCPP $CPPFLAGS'
3029 > ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3030 > ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3031 > ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3032 > if test -z "$CXX"; then
3033 >  if test -n "$CCC"; then
3034 >    CXX=$CCC
3035 >  else
3036 >    if test -n "$ac_tool_prefix"; then
3037 >  for ac_prog in $CXX icpc pathCC pgCC c++ xlc++ xlC g++ CC
3038    do
3039      # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3040   set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3041 < echo "$as_me:$LINENO: checking for $ac_word" >&5
3042 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3043 < if test "${ac_cv_prog_CC+set}" = set; then
3044 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3041 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3042 > $as_echo_n "checking for $ac_word... " >&6; }
3043 > if test "${ac_cv_prog_CXX+set}" = set; then :
3044 >  $as_echo_n "(cached) " >&6
3045   else
3046 <  if test -n "$CC"; then
3047 <  ac_cv_prog_CC="$CC" # Let the user override the test.
3046 >  if test -n "$CXX"; then
3047 >  ac_cv_prog_CXX="$CXX" # Let the user override the test.
3048   else
3049   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3050   for as_dir in $PATH
3051   do
3052    IFS=$as_save_IFS
3053    test -z "$as_dir" && as_dir=.
3054 <  for ac_exec_ext in '' $ac_executable_extensions; do
3055 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3056 <    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3057 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3054 >    for ac_exec_ext in '' $ac_executable_extensions; do
3055 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3056 >    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3057 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3058      break 2
3059    fi
3060   done
3061 < done
3061 >  done
3062 > IFS=$as_save_IFS
3063  
3064   fi
3065   fi
3066 < CC=$ac_cv_prog_CC
3067 < if test -n "$CC"; then
3068 <  echo "$as_me:$LINENO: result: $CC" >&5
3069 < echo "${ECHO_T}$CC" >&6
3066 > CXX=$ac_cv_prog_CXX
3067 > if test -n "$CXX"; then
3068 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3069 > $as_echo "$CXX" >&6; }
3070   else
3071 <  echo "$as_me:$LINENO: result: no" >&5
3072 < echo "${ECHO_T}no" >&6
3071 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3072 > $as_echo "no" >&6; }
3073   fi
3074  
3075 <    test -n "$CC" && break
3075 >
3076 >    test -n "$CXX" && break
3077    done
3078   fi
3079 < if test -z "$CC"; then
3080 <  ac_ct_CC=$CC
3081 <  for ac_prog in icc xlc gcc cc
3079 > if test -z "$CXX"; then
3080 >  ac_ct_CXX=$CXX
3081 >  for ac_prog in $CXX icpc pathCC pgCC c++ xlc++ xlC g++ CC
3082   do
3083    # Extract the first word of "$ac_prog", so it can be a program name with args.
3084   set dummy $ac_prog; ac_word=$2
3085 < echo "$as_me:$LINENO: checking for $ac_word" >&5
3086 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3087 < if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3088 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3085 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3086 > $as_echo_n "checking for $ac_word... " >&6; }
3087 > if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3088 >  $as_echo_n "(cached) " >&6
3089   else
3090 <  if test -n "$ac_ct_CC"; then
3091 <  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3090 >  if test -n "$ac_ct_CXX"; then
3091 >  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3092   else
3093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3094   for as_dir in $PATH
3095   do
3096    IFS=$as_save_IFS
3097    test -z "$as_dir" && as_dir=.
3098 <  for ac_exec_ext in '' $ac_executable_extensions; do
3099 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3100 <    ac_cv_prog_ac_ct_CC="$ac_prog"
3101 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3098 >    for ac_exec_ext in '' $ac_executable_extensions; do
3099 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3100 >    ac_cv_prog_ac_ct_CXX="$ac_prog"
3101 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3102      break 2
3103    fi
3104   done
3105 < done
3105 >  done
3106 > IFS=$as_save_IFS
3107  
3108   fi
3109   fi
3110 < ac_ct_CC=$ac_cv_prog_ac_ct_CC
3111 < if test -n "$ac_ct_CC"; then
3112 <  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3113 < echo "${ECHO_T}$ac_ct_CC" >&6
3110 > ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3111 > if test -n "$ac_ct_CXX"; then
3112 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3113 > $as_echo "$ac_ct_CXX" >&6; }
3114   else
3115 <  echo "$as_me:$LINENO: result: no" >&5
3116 < echo "${ECHO_T}no" >&6
3115 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3116 > $as_echo "no" >&6; }
3117   fi
3118  
3119 <  test -n "$ac_ct_CC" && break
3119 >
3120 >  test -n "$ac_ct_CXX" && break
3121   done
3122  
3123 <  CC=$ac_ct_CC
3123 >  if test "x$ac_ct_CXX" = x; then
3124 >    CXX="g++"
3125 >  else
3126 >    case $cross_compiling:$ac_tool_warned in
3127 > yes:)
3128 > { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3129 > $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3130 > ac_tool_warned=yes ;;
3131 > esac
3132 >    CXX=$ac_ct_CXX
3133 >  fi
3134   fi
3135  
3136 <
3137 < test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2053 < See \`config.log' for more details." >&5
2054 < echo "$as_me: error: no acceptable C compiler found in \$PATH
2055 < See \`config.log' for more details." >&2;}
2056 <   { (exit 1); exit 1; }; }
2057 <
3136 >  fi
3137 > fi
3138   # Provide some information about the compiler.
3139 < echo "$as_me:$LINENO:" \
3140 <     "checking for C compiler version" >&5
3141 < ac_compiler=`set X $ac_compile; echo $2`
3142 < { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
3143 <  (eval $ac_compiler --version </dev/null >&5) 2>&5
3139 > $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3140 > set X $ac_compile
3141 > ac_compiler=$2
3142 > for ac_option in --version -v -V -qversion; do
3143 >  { { ac_try="$ac_compiler $ac_option >&5"
3144 > case "(($ac_try" in
3145 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146 >  *) ac_try_echo=$ac_try;;
3147 > esac
3148 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3149 > $as_echo "$ac_try_echo"; } >&5
3150 >  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3151    ac_status=$?
3152 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3153 <  (exit $ac_status); }
3154 < { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
3155 <  (eval $ac_compiler -v </dev/null >&5) 2>&5
3156 <  ac_status=$?
3157 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3158 <  (exit $ac_status); }
3159 < { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
3160 <  (eval $ac_compiler -V </dev/null >&5) 2>&5
3161 <  ac_status=$?
2075 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2076 <  (exit $ac_status); }
3152 >  if test -s conftest.err; then
3153 >    sed '10a\
3154 > ... rest of stderr output deleted ...
3155 >         10q' conftest.err >conftest.er1
3156 >    cat conftest.er1 >&5
3157 >  fi
3158 >  rm -f conftest.er1 conftest.err
3159 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3160 >  test $ac_status = 0; }
3161 > done
3162  
3163 < cat >conftest.$ac_ext <<_ACEOF
2079 < /* confdefs.h.  */
2080 < _ACEOF
2081 < cat confdefs.h >>conftest.$ac_ext
2082 < cat >>conftest.$ac_ext <<_ACEOF
3163 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3164   /* end confdefs.h.  */
3165  
3166   int
# Line 2091 | Line 3172 | ac_clean_files_save=$ac_clean_files
3172   }
3173   _ACEOF
3174   ac_clean_files_save=$ac_clean_files
3175 < ac_clean_files="$ac_clean_files a.out a.exe b.out"
3175 > ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3176   # Try to create an executable without -o first, disregard a.out.
3177   # It will help us diagnose broken compilers, and finding out an intuition
3178   # of exeext.
3179 < echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3180 < echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
3181 < ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2101 < if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2102 <  (eval $ac_link_default) 2>&5
2103 <  ac_status=$?
2104 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2105 <  (exit $ac_status); }; then
2106 <  # Find the output, starting from the most likely.  This scheme is
2107 < # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2108 < # resort.
3179 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
3180 > $as_echo_n "checking whether the C++ compiler works... " >&6; }
3181 > ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3182  
3183 < # Be careful to initialize this variable, since it used to be cached.
3184 < # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
3185 < ac_cv_exeext=
3186 < # b.out is created by i960 compilers.
3187 < for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
3183 > # The possible output files:
3184 > ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3185 >
3186 > ac_rmfiles=
3187 > for ac_file in $ac_files
3188   do
3189 +  case $ac_file in
3190 +    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3191 +    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3192 +  esac
3193 + done
3194 + rm -f $ac_rmfiles
3195 +
3196 + if { { ac_try="$ac_link_default"
3197 + case "(($ac_try" in
3198 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3199 +  *) ac_try_echo=$ac_try;;
3200 + esac
3201 + eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3202 + $as_echo "$ac_try_echo"; } >&5
3203 +  (eval "$ac_link_default") 2>&5
3204 +  ac_status=$?
3205 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3206 +  test $ac_status = 0; }; then :
3207 +  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3208 + # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3209 + # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3210 + # so that the user can short-circuit this test for compilers unknown to
3211 + # Autoconf.
3212 + for ac_file in $ac_files ''
3213 + do
3214    test -f "$ac_file" || continue
3215    case $ac_file in
3216 <    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
3216 >    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3217          ;;
2120    conftest.$ac_ext )
2121        # This is the source file.
2122        ;;
3218      [ab].out )
3219          # We found the default executable, but exeext='' is most
3220          # certainly right.
3221          break;;
3222      *.* )
3223 <        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3224 <        # FIXME: I believe we export ac_cv_exeext for Libtool,
3225 <        # but it would be cool to find out if it's true.  Does anybody
3226 <        # maintain Libtool? --akim.
3227 <        export ac_cv_exeext
3223 >        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3224 >        then :; else
3225 >           ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3226 >        fi
3227 >        # We set ac_cv_exeext here because the later test for it is not
3228 >        # safe: cross compilers may not add the suffix if given an `-o'
3229 >        # argument, so we may need to know it at that point already.
3230 >        # Even if this section looks crufty: it has the advantage of
3231 >        # actually working.
3232          break;;
3233      * )
3234          break;;
3235    esac
3236   done
3237 + test "$ac_cv_exeext" = no && ac_cv_exeext=
3238 +
3239   else
3240 <  echo "$as_me: failed program was:" >&5
3240 >  ac_file=''
3241 > fi
3242 > if test -z "$ac_file"; then :
3243 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3244 > $as_echo "no" >&6; }
3245 > $as_echo "$as_me: failed program was:" >&5
3246   sed 's/^/| /' conftest.$ac_ext >&5
3247  
3248 < { { echo "$as_me:$LINENO: error: C compiler cannot create executables
3249 < See \`config.log' for more details." >&5
3250 < echo "$as_me: error: C compiler cannot create executables
3251 < See \`config.log' for more details." >&2;}
3252 <   { (exit 77); exit 77; }; }
3248 > { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3249 > $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3250 > { as_fn_set_status 77
3251 > as_fn_error "C++ compiler cannot create executables
3252 > See \`config.log' for more details." "$LINENO" 5; }; }
3253 > else
3254 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3255 > $as_echo "yes" >&6; }
3256   fi
3257 <
3257 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5
3258 > $as_echo_n "checking for C++ compiler default output file name... " >&6; }
3259 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3260 > $as_echo "$ac_file" >&6; }
3261   ac_exeext=$ac_cv_exeext
2150 echo "$as_me:$LINENO: result: $ac_file" >&5
2151 echo "${ECHO_T}$ac_file" >&6
3262  
3263 < # Check the compiler produces executables we can run.  If not, either
2154 < # the compiler is broken, or we cross compile.
2155 < echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2156 < echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2157 < # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2158 < # If not cross compiling, check that we can run a simple program.
2159 < if test "$cross_compiling" != yes; then
2160 <  if { ac_try='./$ac_file'
2161 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2162 <  (eval $ac_try) 2>&5
2163 <  ac_status=$?
2164 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2165 <  (exit $ac_status); }; }; then
2166 <    cross_compiling=no
2167 <  else
2168 <    if test "$cross_compiling" = maybe; then
2169 <        cross_compiling=yes
2170 <    else
2171 <        { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2172 < If you meant to cross compile, use \`--host'.
2173 < See \`config.log' for more details." >&5
2174 < echo "$as_me: error: cannot run C compiled programs.
2175 < If you meant to cross compile, use \`--host'.
2176 < See \`config.log' for more details." >&2;}
2177 <   { (exit 1); exit 1; }; }
2178 <    fi
2179 <  fi
2180 < fi
2181 < echo "$as_me:$LINENO: result: yes" >&5
2182 < echo "${ECHO_T}yes" >&6
2183 <
2184 < rm -f a.out a.exe conftest$ac_cv_exeext b.out
3263 > rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3264   ac_clean_files=$ac_clean_files_save
3265 < # Check the compiler produces executables we can run.  If not, either
3266 < # the compiler is broken, or we cross compile.
3267 < echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3268 < echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
3269 < echo "$as_me:$LINENO: result: $cross_compiling" >&5
3270 < echo "${ECHO_T}$cross_compiling" >&6
3271 <
3272 < echo "$as_me:$LINENO: checking for suffix of executables" >&5
3273 < echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
3274 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2196 <  (eval $ac_link) 2>&5
3265 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3266 > $as_echo_n "checking for suffix of executables... " >&6; }
3267 > if { { ac_try="$ac_link"
3268 > case "(($ac_try" in
3269 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3270 >  *) ac_try_echo=$ac_try;;
3271 > esac
3272 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3273 > $as_echo "$ac_try_echo"; } >&5
3274 >  (eval "$ac_link") 2>&5
3275    ac_status=$?
3276 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3277 <  (exit $ac_status); }; then
3276 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3277 >  test $ac_status = 0; }; then :
3278    # If both `conftest.exe' and `conftest' are `present' (well, observable)
3279   # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3280   # work properly (i.e., refer to `conftest.exe'), while it won't with
# Line 2204 | Line 3282 | for ac_file in conftest.exe conftest conftest.*; do
3282   for ac_file in conftest.exe conftest conftest.*; do
3283    test -f "$ac_file" || continue
3284    case $ac_file in
3285 <    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
3285 >    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3286      *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2209          export ac_cv_exeext
3287            break;;
3288      * ) break;;
3289    esac
3290   done
3291   else
3292 <  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3293 < See \`config.log' for more details." >&5
3294 < echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3295 < See \`config.log' for more details." >&2;}
2219 <   { (exit 1); exit 1; }; }
3292 >  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3293 > $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3294 > as_fn_error "cannot compute suffix of executables: cannot compile and link
3295 > See \`config.log' for more details." "$LINENO" 5; }
3296   fi
3297 + rm -f conftest conftest$ac_cv_exeext
3298 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3299 + $as_echo "$ac_cv_exeext" >&6; }
3300  
2222 rm -f conftest$ac_cv_exeext
2223 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2224 echo "${ECHO_T}$ac_cv_exeext" >&6
2225
3301   rm -f conftest.$ac_ext
3302   EXEEXT=$ac_cv_exeext
3303   ac_exeext=$EXEEXT
3304 < echo "$as_me:$LINENO: checking for suffix of object files" >&5
3305 < echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
3306 < if test "${ac_cv_objext+set}" = set; then
3307 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3308 < else
3309 <  cat >conftest.$ac_ext <<_ACEOF
3310 < /* confdefs.h.  */
3304 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3305 > /* end confdefs.h.  */
3306 > #include <stdio.h>
3307 > int
3308 > main ()
3309 > {
3310 > FILE *f = fopen ("conftest.out", "w");
3311 > return ferror (f) || fclose (f) != 0;
3312 >
3313 >  ;
3314 >  return 0;
3315 > }
3316   _ACEOF
3317 < cat confdefs.h >>conftest.$ac_ext
3318 < cat >>conftest.$ac_ext <<_ACEOF
3317 > ac_clean_files="$ac_clean_files conftest.out"
3318 > # Check that the compiler produces executables we can run.  If not, either
3319 > # the compiler is broken, or we cross compile.
3320 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3321 > $as_echo_n "checking whether we are cross compiling... " >&6; }
3322 > if test "$cross_compiling" != yes; then
3323 >  { { ac_try="$ac_link"
3324 > case "(($ac_try" in
3325 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3326 >  *) ac_try_echo=$ac_try;;
3327 > esac
3328 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3329 > $as_echo "$ac_try_echo"; } >&5
3330 >  (eval "$ac_link") 2>&5
3331 >  ac_status=$?
3332 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3333 >  test $ac_status = 0; }
3334 >  if { ac_try='./conftest$ac_cv_exeext'
3335 >  { { case "(($ac_try" in
3336 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3337 >  *) ac_try_echo=$ac_try;;
3338 > esac
3339 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3340 > $as_echo "$ac_try_echo"; } >&5
3341 >  (eval "$ac_try") 2>&5
3342 >  ac_status=$?
3343 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3344 >  test $ac_status = 0; }; }; then
3345 >    cross_compiling=no
3346 >  else
3347 >    if test "$cross_compiling" = maybe; then
3348 >        cross_compiling=yes
3349 >    else
3350 >        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3351 > $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3352 > as_fn_error "cannot run C++ compiled programs.
3353 > If you meant to cross compile, use \`--host'.
3354 > See \`config.log' for more details." "$LINENO" 5; }
3355 >    fi
3356 >  fi
3357 > fi
3358 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3359 > $as_echo "$cross_compiling" >&6; }
3360 >
3361 > rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3362 > ac_clean_files=$ac_clean_files_save
3363 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3364 > $as_echo_n "checking for suffix of object files... " >&6; }
3365 > if test "${ac_cv_objext+set}" = set; then :
3366 >  $as_echo_n "(cached) " >&6
3367 > else
3368 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3369   /* end confdefs.h.  */
3370  
3371   int
# Line 2247 | Line 3377 | rm -f conftest.o conftest.obj
3377   }
3378   _ACEOF
3379   rm -f conftest.o conftest.obj
3380 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3381 <  (eval $ac_compile) 2>&5
3380 > if { { ac_try="$ac_compile"
3381 > case "(($ac_try" in
3382 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3383 >  *) ac_try_echo=$ac_try;;
3384 > esac
3385 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3386 > $as_echo "$ac_try_echo"; } >&5
3387 >  (eval "$ac_compile") 2>&5
3388    ac_status=$?
3389 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3390 <  (exit $ac_status); }; then
3391 <  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
3389 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3390 >  test $ac_status = 0; }; then :
3391 >  for ac_file in conftest.o conftest.obj conftest.*; do
3392 >  test -f "$ac_file" || continue;
3393    case $ac_file in
3394 <    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
3394 >    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3395      *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3396         break;;
3397    esac
3398   done
3399   else
3400 <  echo "$as_me: failed program was:" >&5
3400 >  $as_echo "$as_me: failed program was:" >&5
3401   sed 's/^/| /' conftest.$ac_ext >&5
3402  
3403 < { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3404 < See \`config.log' for more details." >&5
3405 < echo "$as_me: error: cannot compute suffix of object files: cannot compile
3406 < See \`config.log' for more details." >&2;}
2270 <   { (exit 1); exit 1; }; }
3403 > { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3404 > $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3405 > as_fn_error "cannot compute suffix of object files: cannot compile
3406 > See \`config.log' for more details." "$LINENO" 5; }
3407   fi
2272
3408   rm -f conftest.$ac_cv_objext conftest.$ac_ext
3409   fi
3410 < echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3411 < echo "${ECHO_T}$ac_cv_objext" >&6
3410 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3411 > $as_echo "$ac_cv_objext" >&6; }
3412   OBJEXT=$ac_cv_objext
3413   ac_objext=$OBJEXT
3414 < echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3415 < echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
3416 < if test "${ac_cv_c_compiler_gnu+set}" = set; then
3417 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3414 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3415 > $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3416 > if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3417 >  $as_echo_n "(cached) " >&6
3418   else
3419 <  cat >conftest.$ac_ext <<_ACEOF
2285 < /* confdefs.h.  */
2286 < _ACEOF
2287 < cat confdefs.h >>conftest.$ac_ext
2288 < cat >>conftest.$ac_ext <<_ACEOF
3419 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3420   /* end confdefs.h.  */
3421  
3422   int
# Line 2299 | Line 3430 | _ACEOF
3430    return 0;
3431   }
3432   _ACEOF
3433 < rm -f conftest.$ac_objext
2303 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2304 <  (eval $ac_compile) 2>conftest.er1
2305 <  ac_status=$?
2306 <  grep -v '^ *+' conftest.er1 >conftest.err
2307 <  rm -f conftest.er1
2308 <  cat conftest.err >&5
2309 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2310 <  (exit $ac_status); } &&
2311 <         { ac_try='test -z "$ac_c_werror_flag"
2312 <                         || test ! -s conftest.err'
2313 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2314 <  (eval $ac_try) 2>&5
2315 <  ac_status=$?
2316 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2317 <  (exit $ac_status); }; } &&
2318 <         { ac_try='test -s conftest.$ac_objext'
2319 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2320 <  (eval $ac_try) 2>&5
2321 <  ac_status=$?
2322 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2323 <  (exit $ac_status); }; }; then
3433 > if ac_fn_cxx_try_compile "$LINENO"; then :
3434    ac_compiler_gnu=yes
3435   else
3436 <  echo "$as_me: failed program was:" >&5
2327 < sed 's/^/| /' conftest.$ac_ext >&5
2328 <
2329 < ac_compiler_gnu=no
3436 >  ac_compiler_gnu=no
3437   fi
3438 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3439 < ac_cv_c_compiler_gnu=$ac_compiler_gnu
3438 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3439 > ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3440  
3441   fi
3442 < echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3443 < echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
3444 < GCC=`test $ac_compiler_gnu = yes && echo yes`
3445 < ac_test_CFLAGS=${CFLAGS+set}
2339 < ac_save_CFLAGS=$CFLAGS
2340 < CFLAGS="-g"
2341 < echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2342 < echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2343 < if test "${ac_cv_prog_cc_g+set}" = set; then
2344 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3442 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3443 > $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3444 > if test $ac_compiler_gnu = yes; then
3445 >  GXX=yes
3446   else
3447 <  cat >conftest.$ac_ext <<_ACEOF
3448 < /* confdefs.h.  */
3449 < _ACEOF
3450 < cat confdefs.h >>conftest.$ac_ext
3451 < cat >>conftest.$ac_ext <<_ACEOF
3447 >  GXX=
3448 > fi
3449 > ac_test_CXXFLAGS=${CXXFLAGS+set}
3450 > ac_save_CXXFLAGS=$CXXFLAGS
3451 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3452 > $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3453 > if test "${ac_cv_prog_cxx_g+set}" = set; then :
3454 >  $as_echo_n "(cached) " >&6
3455 > else
3456 >  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3457 >   ac_cxx_werror_flag=yes
3458 >   ac_cv_prog_cxx_g=no
3459 >   CXXFLAGS="-g"
3460 >   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3461   /* end confdefs.h.  */
3462  
3463   int
# Line 2358 | Line 3468 | _ACEOF
3468    return 0;
3469   }
3470   _ACEOF
3471 < rm -f conftest.$ac_objext
3472 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2363 <  (eval $ac_compile) 2>conftest.er1
2364 <  ac_status=$?
2365 <  grep -v '^ *+' conftest.er1 >conftest.err
2366 <  rm -f conftest.er1
2367 <  cat conftest.err >&5
2368 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2369 <  (exit $ac_status); } &&
2370 <         { ac_try='test -z "$ac_c_werror_flag"
2371 <                         || test ! -s conftest.err'
2372 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2373 <  (eval $ac_try) 2>&5
2374 <  ac_status=$?
2375 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2376 <  (exit $ac_status); }; } &&
2377 <         { ac_try='test -s conftest.$ac_objext'
2378 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2379 <  (eval $ac_try) 2>&5
2380 <  ac_status=$?
2381 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2382 <  (exit $ac_status); }; }; then
2383 <  ac_cv_prog_cc_g=yes
3471 > if ac_fn_cxx_try_compile "$LINENO"; then :
3472 >  ac_cv_prog_cxx_g=yes
3473   else
3474 <  echo "$as_me: failed program was:" >&5
3475 < sed 's/^/| /' conftest.$ac_ext >&5
2387 <
2388 < ac_cv_prog_cc_g=no
2389 < fi
2390 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2391 < fi
2392 < echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2393 < echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2394 < if test "$ac_test_CFLAGS" = set; then
2395 <  CFLAGS=$ac_save_CFLAGS
2396 < elif test $ac_cv_prog_cc_g = yes; then
2397 <  if test "$GCC" = yes; then
2398 <    CFLAGS="-g -O2"
2399 <  else
2400 <    CFLAGS="-g"
2401 <  fi
2402 < else
2403 <  if test "$GCC" = yes; then
2404 <    CFLAGS="-O2"
2405 <  else
2406 <    CFLAGS=
2407 <  fi
2408 < fi
2409 < echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2410 < echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2411 < if test "${ac_cv_prog_cc_stdc+set}" = set; then
2412 <  echo $ECHO_N "(cached) $ECHO_C" >&6
2413 < else
2414 <  ac_cv_prog_cc_stdc=no
2415 < ac_save_CC=$CC
2416 < cat >conftest.$ac_ext <<_ACEOF
2417 < /* confdefs.h.  */
2418 < _ACEOF
2419 < cat confdefs.h >>conftest.$ac_ext
2420 < cat >>conftest.$ac_ext <<_ACEOF
3474 >  CXXFLAGS=""
3475 >      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3476   /* end confdefs.h.  */
3477 < #include <stdarg.h>
3478 < #include <stdio.h>
3479 < #include <sys/types.h>
2425 < #include <sys/stat.h>
2426 < /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2427 < struct buf { int x; };
2428 < FILE * (*rcsopen) (struct buf *, struct stat *, int);
2429 < static char *e (p, i)
2430 <     char **p;
2431 <     int i;
3477 >
3478 > int
3479 > main ()
3480   {
3481 <  return p[i];
3481 >
3482 >  ;
3483 >  return 0;
3484   }
3485 < static char *f (char * (*g) (char **, int), char **p, ...)
3486 < {
2437 <  char *s;
2438 <  va_list v;
2439 <  va_start (v,p);
2440 <  s = g (p, va_arg (v,int));
2441 <  va_end (v);
2442 <  return s;
2443 < }
3485 > _ACEOF
3486 > if ac_fn_cxx_try_compile "$LINENO"; then :
3487  
3488 < /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3489 <   function prototypes and stuff, but not '\xHH' hex character constants.
3490 <   These don't provoke an error unfortunately, instead are silently treated
3491 <   as 'x'.  The following induces an error, until -std1 is added to get
3492 <   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2450 <   array size at least.  It's necessary to write '\x00'==0 to get something
2451 <   that's true only with -std1.  */
2452 < int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3488 > else
3489 >  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3490 >         CXXFLAGS="-g"
3491 >         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3492 > /* end confdefs.h.  */
3493  
2454 int test (int i, double x);
2455 struct s1 {int (*f) (int a);};
2456 struct s2 {int (*f) (double a);};
2457 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2458 int argc;
2459 char **argv;
3494   int
3495   main ()
3496   {
3497 < return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3497 >
3498    ;
3499    return 0;
3500   }
3501   _ACEOF
3502 < # Don't try gcc -ansi; that turns off useful extensions and
3503 < # breaks some systems' header files.
2470 < # AIX                   -qlanglvl=ansi
2471 < # Ultrix and OSF/1      -std1
2472 < # HP-UX 10.20 and later -Ae
2473 < # HP-UX older versions  -Aa -D_HPUX_SOURCE
2474 < # SVR4                  -Xc -D__EXTENSIONS__
2475 < for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2476 < do
2477 <  CC="$ac_save_CC $ac_arg"
2478 <  rm -f conftest.$ac_objext
2479 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2480 <  (eval $ac_compile) 2>conftest.er1
2481 <  ac_status=$?
2482 <  grep -v '^ *+' conftest.er1 >conftest.err
2483 <  rm -f conftest.er1
2484 <  cat conftest.err >&5
2485 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2486 <  (exit $ac_status); } &&
2487 <         { ac_try='test -z "$ac_c_werror_flag"
2488 <                         || test ! -s conftest.err'
2489 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2490 <  (eval $ac_try) 2>&5
2491 <  ac_status=$?
2492 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2493 <  (exit $ac_status); }; } &&
2494 <         { ac_try='test -s conftest.$ac_objext'
2495 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2496 <  (eval $ac_try) 2>&5
2497 <  ac_status=$?
2498 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2499 <  (exit $ac_status); }; }; then
2500 <  ac_cv_prog_cc_stdc=$ac_arg
2501 < break
2502 < else
2503 <  echo "$as_me: failed program was:" >&5
2504 < sed 's/^/| /' conftest.$ac_ext >&5
2505 <
3502 > if ac_fn_cxx_try_compile "$LINENO"; then :
3503 >  ac_cv_prog_cxx_g=yes
3504   fi
3505 < rm -f conftest.err conftest.$ac_objext
2508 < done
2509 < rm -f conftest.$ac_ext conftest.$ac_objext
2510 < CC=$ac_save_CC
2511 <
3505 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3506   fi
3507 <
2514 < case "x$ac_cv_prog_cc_stdc" in
2515 <  x|xno)
2516 <    echo "$as_me:$LINENO: result: none needed" >&5
2517 < echo "${ECHO_T}none needed" >&6 ;;
2518 <  *)
2519 <    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2520 < echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2521 <    CC="$CC $ac_cv_prog_cc_stdc" ;;
2522 < esac
2523 <
2524 < # Some people use a C++ compiler to compile C.  Since we use `exit',
2525 < # in C++ we need to declare it.  In case someone uses the same compiler
2526 < # for both compiling C and C++ we need to have the C++ compiler decide
2527 < # the declaration of exit, since it's the most demanding environment.
2528 < cat >conftest.$ac_ext <<_ACEOF
2529 < #ifndef __cplusplus
2530 <  choke me
2531 < #endif
2532 < _ACEOF
2533 < rm -f conftest.$ac_objext
2534 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2535 <  (eval $ac_compile) 2>conftest.er1
2536 <  ac_status=$?
2537 <  grep -v '^ *+' conftest.er1 >conftest.err
2538 <  rm -f conftest.er1
2539 <  cat conftest.err >&5
2540 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541 <  (exit $ac_status); } &&
2542 <         { ac_try='test -z "$ac_c_werror_flag"
2543 <                         || test ! -s conftest.err'
2544 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2545 <  (eval $ac_try) 2>&5
2546 <  ac_status=$?
2547 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2548 <  (exit $ac_status); }; } &&
2549 <         { ac_try='test -s conftest.$ac_objext'
2550 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2551 <  (eval $ac_try) 2>&5
2552 <  ac_status=$?
2553 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554 <  (exit $ac_status); }; }; then
2555 <  for ac_declaration in \
2556 <   '' \
2557 <   'extern "C" void std::exit (int) throw (); using std::exit;' \
2558 <   'extern "C" void std::exit (int); using std::exit;' \
2559 <   'extern "C" void exit (int) throw ();' \
2560 <   'extern "C" void exit (int);' \
2561 <   'void exit (int);'
2562 < do
2563 <  cat >conftest.$ac_ext <<_ACEOF
2564 < /* confdefs.h.  */
2565 < _ACEOF
2566 < cat confdefs.h >>conftest.$ac_ext
2567 < cat >>conftest.$ac_ext <<_ACEOF
2568 < /* end confdefs.h.  */
2569 < $ac_declaration
2570 < #include <stdlib.h>
2571 < int
2572 < main ()
2573 < {
2574 < exit (42);
2575 <  ;
2576 <  return 0;
2577 < }
2578 < _ACEOF
2579 < rm -f conftest.$ac_objext
2580 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2581 <  (eval $ac_compile) 2>conftest.er1
2582 <  ac_status=$?
2583 <  grep -v '^ *+' conftest.er1 >conftest.err
2584 <  rm -f conftest.er1
2585 <  cat conftest.err >&5
2586 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2587 <  (exit $ac_status); } &&
2588 <         { ac_try='test -z "$ac_c_werror_flag"
2589 <                         || test ! -s conftest.err'
2590 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2591 <  (eval $ac_try) 2>&5
2592 <  ac_status=$?
2593 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2594 <  (exit $ac_status); }; } &&
2595 <         { ac_try='test -s conftest.$ac_objext'
2596 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2597 <  (eval $ac_try) 2>&5
2598 <  ac_status=$?
2599 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2600 <  (exit $ac_status); }; }; then
2601 <  :
2602 < else
2603 <  echo "$as_me: failed program was:" >&5
2604 < sed 's/^/| /' conftest.$ac_ext >&5
2605 <
2606 < continue
3507 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3508   fi
3509 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3510 <  cat >conftest.$ac_ext <<_ACEOF
2610 < /* confdefs.h.  */
2611 < _ACEOF
2612 < cat confdefs.h >>conftest.$ac_ext
2613 < cat >>conftest.$ac_ext <<_ACEOF
2614 < /* end confdefs.h.  */
2615 < $ac_declaration
2616 < int
2617 < main ()
2618 < {
2619 < exit (42);
2620 <  ;
2621 <  return 0;
2622 < }
2623 < _ACEOF
2624 < rm -f conftest.$ac_objext
2625 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2626 <  (eval $ac_compile) 2>conftest.er1
2627 <  ac_status=$?
2628 <  grep -v '^ *+' conftest.er1 >conftest.err
2629 <  rm -f conftest.er1
2630 <  cat conftest.err >&5
2631 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2632 <  (exit $ac_status); } &&
2633 <         { ac_try='test -z "$ac_c_werror_flag"
2634 <                         || test ! -s conftest.err'
2635 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2636 <  (eval $ac_try) 2>&5
2637 <  ac_status=$?
2638 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2639 <  (exit $ac_status); }; } &&
2640 <         { ac_try='test -s conftest.$ac_objext'
2641 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2642 <  (eval $ac_try) 2>&5
2643 <  ac_status=$?
2644 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2645 <  (exit $ac_status); }; }; then
2646 <  break
2647 < else
2648 <  echo "$as_me: failed program was:" >&5
2649 < sed 's/^/| /' conftest.$ac_ext >&5
2650 <
3509 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3510 >   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3511   fi
3512 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3513 < done
3514 < rm -f conftest*
3515 < if test -n "$ac_declaration"; then
3516 <  echo '#ifdef __cplusplus' >>confdefs.h
3517 <  echo $ac_declaration      >>confdefs.h
3518 <  echo '#endif'             >>confdefs.h
3519 < fi
3520 <
3512 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3513 > $as_echo "$ac_cv_prog_cxx_g" >&6; }
3514 > if test "$ac_test_CXXFLAGS" = set; then
3515 >  CXXFLAGS=$ac_save_CXXFLAGS
3516 > elif test $ac_cv_prog_cxx_g = yes; then
3517 >  if test "$GXX" = yes; then
3518 >    CXXFLAGS="-g -O2"
3519 >  else
3520 >    CXXFLAGS="-g"
3521 >  fi
3522   else
3523 <  echo "$as_me: failed program was:" >&5
3524 < sed 's/^/| /' conftest.$ac_ext >&5
3525 <
3523 >  if test "$GXX" = yes; then
3524 >    CXXFLAGS="-O2"
3525 >  else
3526 >    CXXFLAGS=
3527 >  fi
3528   fi
2666 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3529   ac_ext=c
3530   ac_cpp='$CPP $CPPFLAGS'
3531   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3532   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3533   ac_compiler_gnu=$ac_cv_c_compiler_gnu
3534  
3535 <
3536 < ac_ext=cc
3537 < ac_cpp='$CXXCPP $CPPFLAGS'
3538 < ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3539 < ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2678 < ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3535 > ac_ext=c
3536 > ac_cpp='$CPP $CPPFLAGS'
3537 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3538 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3539 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
3540   if test -n "$ac_tool_prefix"; then
3541 <  for ac_prog in $CCC icpc icc xlc++ xlC CC g++ c++
3541 >  for ac_prog in $CC icc pathcc pgcc cc xlc gcc
3542    do
3543      # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3544   set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3545 < echo "$as_me:$LINENO: checking for $ac_word" >&5
3546 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3547 < if test "${ac_cv_prog_CXX+set}" = set; then
3548 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3545 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3546 > $as_echo_n "checking for $ac_word... " >&6; }
3547 > if test "${ac_cv_prog_CC+set}" = set; then :
3548 >  $as_echo_n "(cached) " >&6
3549   else
3550 <  if test -n "$CXX"; then
3551 <  ac_cv_prog_CXX="$CXX" # Let the user override the test.
3550 >  if test -n "$CC"; then
3551 >  ac_cv_prog_CC="$CC" # Let the user override the test.
3552   else
3553   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3554   for as_dir in $PATH
3555   do
3556    IFS=$as_save_IFS
3557    test -z "$as_dir" && as_dir=.
3558 <  for ac_exec_ext in '' $ac_executable_extensions; do
3559 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3560 <    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3561 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3558 >    for ac_exec_ext in '' $ac_executable_extensions; do
3559 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3560 >    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3561 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3562      break 2
3563    fi
3564   done
3565 < done
3565 >  done
3566 > IFS=$as_save_IFS
3567  
3568   fi
3569   fi
3570 < CXX=$ac_cv_prog_CXX
3571 < if test -n "$CXX"; then
3572 <  echo "$as_me:$LINENO: result: $CXX" >&5
3573 < echo "${ECHO_T}$CXX" >&6
3570 > CC=$ac_cv_prog_CC
3571 > if test -n "$CC"; then
3572 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3573 > $as_echo "$CC" >&6; }
3574   else
3575 <  echo "$as_me:$LINENO: result: no" >&5
3576 < echo "${ECHO_T}no" >&6
3575 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3576 > $as_echo "no" >&6; }
3577   fi
3578  
3579 <    test -n "$CXX" && break
3579 >
3580 >    test -n "$CC" && break
3581    done
3582   fi
3583 < if test -z "$CXX"; then
3584 <  ac_ct_CXX=$CXX
3585 <  for ac_prog in $CCC icpc icc xlc++ xlC CC g++ c++
3583 > if test -z "$CC"; then
3584 >  ac_ct_CC=$CC
3585 >  for ac_prog in $CC icc pathcc pgcc cc xlc gcc
3586   do
3587    # Extract the first word of "$ac_prog", so it can be a program name with args.
3588   set dummy $ac_prog; ac_word=$2
3589 < echo "$as_me:$LINENO: checking for $ac_word" >&5
3590 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3591 < if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3592 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3589 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3590 > $as_echo_n "checking for $ac_word... " >&6; }
3591 > if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3592 >  $as_echo_n "(cached) " >&6
3593   else
3594 <  if test -n "$ac_ct_CXX"; then
3595 <  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3594 >  if test -n "$ac_ct_CC"; then
3595 >  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3596   else
3597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3598   for as_dir in $PATH
3599   do
3600    IFS=$as_save_IFS
3601    test -z "$as_dir" && as_dir=.
3602 <  for ac_exec_ext in '' $ac_executable_extensions; do
3603 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3604 <    ac_cv_prog_ac_ct_CXX="$ac_prog"
3605 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3602 >    for ac_exec_ext in '' $ac_executable_extensions; do
3603 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3604 >    ac_cv_prog_ac_ct_CC="$ac_prog"
3605 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3606      break 2
3607    fi
3608   done
3609 < done
3609 >  done
3610 > IFS=$as_save_IFS
3611  
3612   fi
3613   fi
3614 < ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3615 < if test -n "$ac_ct_CXX"; then
3616 <  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
3617 < echo "${ECHO_T}$ac_ct_CXX" >&6
3614 > ac_ct_CC=$ac_cv_prog_ac_ct_CC
3615 > if test -n "$ac_ct_CC"; then
3616 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3617 > $as_echo "$ac_ct_CC" >&6; }
3618   else
3619 <  echo "$as_me:$LINENO: result: no" >&5
3620 < echo "${ECHO_T}no" >&6
3619 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3620 > $as_echo "no" >&6; }
3621   fi
3622  
3623 <  test -n "$ac_ct_CXX" && break
3623 >
3624 >  test -n "$ac_ct_CC" && break
3625   done
2761 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3626  
3627 <  CXX=$ac_ct_CXX
3627 >  if test "x$ac_ct_CC" = x; then
3628 >    CC=""
3629 >  else
3630 >    case $cross_compiling:$ac_tool_warned in
3631 > yes:)
3632 > { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3633 > $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3634 > ac_tool_warned=yes ;;
3635 > esac
3636 >    CC=$ac_ct_CC
3637 >  fi
3638   fi
3639  
3640  
3641 + test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3642 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3643 + as_fn_error "no acceptable C compiler found in \$PATH
3644 + See \`config.log' for more details." "$LINENO" 5; }
3645 +
3646   # Provide some information about the compiler.
3647 < echo "$as_me:$LINENO:" \
3648 <     "checking for C++ compiler version" >&5
3649 < ac_compiler=`set X $ac_compile; echo $2`
3650 < { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
3651 <  (eval $ac_compiler --version </dev/null >&5) 2>&5
3652 <  ac_status=$?
3653 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3654 <  (exit $ac_status); }
3655 < { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
3656 <  (eval $ac_compiler -v </dev/null >&5) 2>&5
3657 <  ac_status=$?
3658 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3659 <  (exit $ac_status); }
3660 < { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
3661 <  (eval $ac_compiler -V </dev/null >&5) 2>&5
3662 <  ac_status=$?
3663 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3664 <  (exit $ac_status); }
3647 > $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3648 > set X $ac_compile
3649 > ac_compiler=$2
3650 > for ac_option in --version -v -V -qversion; do
3651 >  { { ac_try="$ac_compiler $ac_option >&5"
3652 > case "(($ac_try" in
3653 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3654 >  *) ac_try_echo=$ac_try;;
3655 > esac
3656 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3657 > $as_echo "$ac_try_echo"; } >&5
3658 >  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3659 >  ac_status=$?
3660 >  if test -s conftest.err; then
3661 >    sed '10a\
3662 > ... rest of stderr output deleted ...
3663 >         10q' conftest.err >conftest.er1
3664 >    cat conftest.er1 >&5
3665 >  fi
3666 >  rm -f conftest.er1 conftest.err
3667 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3668 >  test $ac_status = 0; }
3669 > done
3670  
3671 < echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
3672 < echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3673 < if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3674 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3671 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3672 > $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3673 > if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3674 >  $as_echo_n "(cached) " >&6
3675   else
3676 <  cat >conftest.$ac_ext <<_ACEOF
2793 < /* confdefs.h.  */
2794 < _ACEOF
2795 < cat confdefs.h >>conftest.$ac_ext
2796 < cat >>conftest.$ac_ext <<_ACEOF
3676 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3677   /* end confdefs.h.  */
3678  
3679   int
# Line 2807 | Line 3687 | _ACEOF
3687    return 0;
3688   }
3689   _ACEOF
3690 < rm -f conftest.$ac_objext
2811 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2812 <  (eval $ac_compile) 2>conftest.er1
2813 <  ac_status=$?
2814 <  grep -v '^ *+' conftest.er1 >conftest.err
2815 <  rm -f conftest.er1
2816 <  cat conftest.err >&5
2817 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2818 <  (exit $ac_status); } &&
2819 <         { ac_try='test -z "$ac_cxx_werror_flag"
2820 <                         || test ! -s conftest.err'
2821 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2822 <  (eval $ac_try) 2>&5
2823 <  ac_status=$?
2824 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2825 <  (exit $ac_status); }; } &&
2826 <         { ac_try='test -s conftest.$ac_objext'
2827 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2828 <  (eval $ac_try) 2>&5
2829 <  ac_status=$?
2830 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2831 <  (exit $ac_status); }; }; then
3690 > if ac_fn_c_try_compile "$LINENO"; then :
3691    ac_compiler_gnu=yes
3692   else
3693 <  echo "$as_me: failed program was:" >&5
2835 < sed 's/^/| /' conftest.$ac_ext >&5
2836 <
2837 < ac_compiler_gnu=no
3693 >  ac_compiler_gnu=no
3694   fi
3695 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3696 < ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3695 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3696 > ac_cv_c_compiler_gnu=$ac_compiler_gnu
3697  
3698   fi
3699 < echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
3700 < echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3701 < GXX=`test $ac_compiler_gnu = yes && echo yes`
3702 < ac_test_CXXFLAGS=${CXXFLAGS+set}
2847 < ac_save_CXXFLAGS=$CXXFLAGS
2848 < CXXFLAGS="-g"
2849 < echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
2850 < echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2851 < if test "${ac_cv_prog_cxx_g+set}" = set; then
2852 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3699 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3700 > $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3701 > if test $ac_compiler_gnu = yes; then
3702 >  GCC=yes
3703   else
3704 <  cat >conftest.$ac_ext <<_ACEOF
3705 < /* confdefs.h.  */
3704 >  GCC=
3705 > fi
3706 > ac_test_CFLAGS=${CFLAGS+set}
3707 > ac_save_CFLAGS=$CFLAGS
3708 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3709 > $as_echo_n "checking whether $CC accepts -g... " >&6; }
3710 > if test "${ac_cv_prog_cc_g+set}" = set; then :
3711 >  $as_echo_n "(cached) " >&6
3712 > else
3713 >  ac_save_c_werror_flag=$ac_c_werror_flag
3714 >   ac_c_werror_flag=yes
3715 >   ac_cv_prog_cc_g=no
3716 >   CFLAGS="-g"
3717 >   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3718 > /* end confdefs.h.  */
3719 >
3720 > int
3721 > main ()
3722 > {
3723 >
3724 >  ;
3725 >  return 0;
3726 > }
3727   _ACEOF
3728 < cat confdefs.h >>conftest.$ac_ext
3729 < cat >>conftest.$ac_ext <<_ACEOF
3728 > if ac_fn_c_try_compile "$LINENO"; then :
3729 >  ac_cv_prog_cc_g=yes
3730 > else
3731 >  CFLAGS=""
3732 >      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3733   /* end confdefs.h.  */
3734  
3735   int
# Line 2866 | Line 3740 | _ACEOF
3740    return 0;
3741   }
3742   _ACEOF
3743 < rm -f conftest.$ac_objext
3744 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2871 <  (eval $ac_compile) 2>conftest.er1
2872 <  ac_status=$?
2873 <  grep -v '^ *+' conftest.er1 >conftest.err
2874 <  rm -f conftest.er1
2875 <  cat conftest.err >&5
2876 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2877 <  (exit $ac_status); } &&
2878 <         { ac_try='test -z "$ac_cxx_werror_flag"
2879 <                         || test ! -s conftest.err'
2880 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2881 <  (eval $ac_try) 2>&5
2882 <  ac_status=$?
2883 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2884 <  (exit $ac_status); }; } &&
2885 <         { ac_try='test -s conftest.$ac_objext'
2886 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2887 <  (eval $ac_try) 2>&5
2888 <  ac_status=$?
2889 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2890 <  (exit $ac_status); }; }; then
2891 <  ac_cv_prog_cxx_g=yes
3743 > if ac_fn_c_try_compile "$LINENO"; then :
3744 >
3745   else
3746 <  echo "$as_me: failed program was:" >&5
3747 < sed 's/^/| /' conftest.$ac_ext >&5
3746 >  ac_c_werror_flag=$ac_save_c_werror_flag
3747 >         CFLAGS="-g"
3748 >         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3749 > /* end confdefs.h.  */
3750  
3751 < ac_cv_prog_cxx_g=no
3751 > int
3752 > main ()
3753 > {
3754 >
3755 >  ;
3756 >  return 0;
3757 > }
3758 > _ACEOF
3759 > if ac_fn_c_try_compile "$LINENO"; then :
3760 >  ac_cv_prog_cc_g=yes
3761   fi
3762 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3762 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3763   fi
3764 < echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
3765 < echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3766 < if test "$ac_test_CXXFLAGS" = set; then
3767 <  CXXFLAGS=$ac_save_CXXFLAGS
3768 < elif test $ac_cv_prog_cxx_g = yes; then
3769 <  if test "$GXX" = yes; then
3770 <    CXXFLAGS="-g -O2"
3764 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3765 > fi
3766 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3767 >   ac_c_werror_flag=$ac_save_c_werror_flag
3768 > fi
3769 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3770 > $as_echo "$ac_cv_prog_cc_g" >&6; }
3771 > if test "$ac_test_CFLAGS" = set; then
3772 >  CFLAGS=$ac_save_CFLAGS
3773 > elif test $ac_cv_prog_cc_g = yes; then
3774 >  if test "$GCC" = yes; then
3775 >    CFLAGS="-g -O2"
3776    else
3777 <    CXXFLAGS="-g"
3777 >    CFLAGS="-g"
3778    fi
3779   else
3780 <  if test "$GXX" = yes; then
3781 <    CXXFLAGS="-O2"
3780 >  if test "$GCC" = yes; then
3781 >    CFLAGS="-O2"
3782    else
3783 <    CXXFLAGS=
3783 >    CFLAGS=
3784    fi
3785   fi
3786 < for ac_declaration in \
3787 <   '' \
3788 <   'extern "C" void std::exit (int) throw (); using std::exit;' \
3789 <   'extern "C" void std::exit (int); using std::exit;' \
3790 <   'extern "C" void exit (int) throw ();' \
3791 <   'extern "C" void exit (int);' \
3792 <   'void exit (int);'
3793 < do
2925 <  cat >conftest.$ac_ext <<_ACEOF
2926 < /* confdefs.h.  */
2927 < _ACEOF
2928 < cat confdefs.h >>conftest.$ac_ext
2929 < cat >>conftest.$ac_ext <<_ACEOF
3786 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3787 > $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3788 > if test "${ac_cv_prog_cc_c89+set}" = set; then :
3789 >  $as_echo_n "(cached) " >&6
3790 > else
3791 >  ac_cv_prog_cc_c89=no
3792 > ac_save_CC=$CC
3793 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3794   /* end confdefs.h.  */
3795 < $ac_declaration
3796 < #include <stdlib.h>
3797 < int
3798 < main ()
3795 > #include <stdarg.h>
3796 > #include <stdio.h>
3797 > #include <sys/types.h>
3798 > #include <sys/stat.h>
3799 > /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3800 > struct buf { int x; };
3801 > FILE * (*rcsopen) (struct buf *, struct stat *, int);
3802 > static char *e (p, i)
3803 >     char **p;
3804 >     int i;
3805   {
3806 < exit (42);
2937 <  ;
2938 <  return 0;
3806 >  return p[i];
3807   }
3808 < _ACEOF
3809 < rm -f conftest.$ac_objext
3810 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3811 <  (eval $ac_compile) 2>conftest.er1
3812 <  ac_status=$?
3813 <  grep -v '^ *+' conftest.er1 >conftest.err
3814 <  rm -f conftest.er1
3815 <  cat conftest.err >&5
3816 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2949 <  (exit $ac_status); } &&
2950 <         { ac_try='test -z "$ac_cxx_werror_flag"
2951 <                         || test ! -s conftest.err'
2952 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2953 <  (eval $ac_try) 2>&5
2954 <  ac_status=$?
2955 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2956 <  (exit $ac_status); }; } &&
2957 <         { ac_try='test -s conftest.$ac_objext'
2958 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2959 <  (eval $ac_try) 2>&5
2960 <  ac_status=$?
2961 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2962 <  (exit $ac_status); }; }; then
2963 <  :
2964 < else
2965 <  echo "$as_me: failed program was:" >&5
2966 < sed 's/^/| /' conftest.$ac_ext >&5
3808 > static char *f (char * (*g) (char **, int), char **p, ...)
3809 > {
3810 >  char *s;
3811 >  va_list v;
3812 >  va_start (v,p);
3813 >  s = g (p, va_arg (v,int));
3814 >  va_end (v);
3815 >  return s;
3816 > }
3817  
3818 < continue
3819 < fi
3820 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3821 <  cat >conftest.$ac_ext <<_ACEOF
3822 < /* confdefs.h.  */
3823 < _ACEOF
3824 < cat confdefs.h >>conftest.$ac_ext
3825 < cat >>conftest.$ac_ext <<_ACEOF
3826 < /* end confdefs.h.  */
3827 < $ac_declaration
3818 > /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3819 >   function prototypes and stuff, but not '\xHH' hex character constants.
3820 >   These don't provoke an error unfortunately, instead are silently treated
3821 >   as 'x'.  The following induces an error, until -std is added to get
3822 >   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3823 >   array size at least.  It's necessary to write '\x00'==0 to get something
3824 >   that's true only with -std.  */
3825 > int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3826 >
3827 > /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3828 >   inside strings and character constants.  */
3829 > #define FOO(x) 'x'
3830 > int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3831 >
3832 > int test (int i, double x);
3833 > struct s1 {int (*f) (int a);};
3834 > struct s2 {int (*f) (double a);};
3835 > int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3836 > int argc;
3837 > char **argv;
3838   int
3839   main ()
3840   {
3841 < exit (42);
3841 > return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3842    ;
3843    return 0;
3844   }
3845   _ACEOF
3846 < rm -f conftest.$ac_objext
3847 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3848 <  (eval $ac_compile) 2>conftest.er1
3849 <  ac_status=$?
3850 <  grep -v '^ *+' conftest.er1 >conftest.err
3851 <  rm -f conftest.er1
2992 <  cat conftest.err >&5
2993 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2994 <  (exit $ac_status); } &&
2995 <         { ac_try='test -z "$ac_cxx_werror_flag"
2996 <                         || test ! -s conftest.err'
2997 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2998 <  (eval $ac_try) 2>&5
2999 <  ac_status=$?
3000 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3001 <  (exit $ac_status); }; } &&
3002 <         { ac_try='test -s conftest.$ac_objext'
3003 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3004 <  (eval $ac_try) 2>&5
3005 <  ac_status=$?
3006 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3007 <  (exit $ac_status); }; }; then
3008 <  break
3009 < else
3010 <  echo "$as_me: failed program was:" >&5
3011 < sed 's/^/| /' conftest.$ac_ext >&5
3012 <
3846 > for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3847 >        -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3848 > do
3849 >  CC="$ac_save_CC $ac_arg"
3850 >  if ac_fn_c_try_compile "$LINENO"; then :
3851 >  ac_cv_prog_cc_c89=$ac_arg
3852   fi
3853 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3853 > rm -f core conftest.err conftest.$ac_objext
3854 >  test "x$ac_cv_prog_cc_c89" != "xno" && break
3855   done
3856 < rm -f conftest*
3857 < if test -n "$ac_declaration"; then
3858 <  echo '#ifdef __cplusplus' >>confdefs.h
3019 <  echo $ac_declaration      >>confdefs.h
3020 <  echo '#endif'             >>confdefs.h
3856 > rm -f conftest.$ac_ext
3857 > CC=$ac_save_CC
3858 >
3859   fi
3860 + # AC_CACHE_VAL
3861 + case "x$ac_cv_prog_cc_c89" in
3862 +  x)
3863 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3864 + $as_echo "none needed" >&6; } ;;
3865 +  xno)
3866 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3867 + $as_echo "unsupported" >&6; } ;;
3868 +  *)
3869 +    CC="$CC $ac_cv_prog_cc_c89"
3870 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3871 + $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3872 + esac
3873 + if test "x$ac_cv_prog_cc_c89" != xno; then :
3874  
3875 + fi
3876 +
3877   ac_ext=c
3878   ac_cpp='$CPP $CPPFLAGS'
3879   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3880   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3881   ac_compiler_gnu=$ac_cv_c_compiler_gnu
3882  
3883 <
3884 < OOPSE_TEMPLATE_FLAGS=""
3885 < if test $ac_cv_cxx_compiler_gnu = no; then
3886 <  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -ptused -no_prelink" >&5
3033 < echo $ECHO_N "checking checking whether ${CXX} accepts -ptused -no_prelink... $ECHO_C" >&6
3034 <  echo 'void f(){}' > conftest.cc
3035 <  if test -z "`${CXX} -ptused -no_prelink -c conftest.cc 2>&1`"; then
3036 <    echo "$as_me:$LINENO: result: yes" >&5
3037 < echo "${ECHO_T}yes" >&6
3038 <    OOPSE_TEMPLATE_FLAGS="-ptused -no_prelink"
3039 <  else
3040 <    echo "$as_me:$LINENO: result: no" >&5
3041 < echo "${ECHO_T}no" >&6
3042 <  fi
3043 <  rm -f conftest*
3044 <  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -instances=static" >&5
3045 < echo $ECHO_N "checking checking whether ${CXX} accepts -instances=static... $ECHO_C" >&6
3046 <  echo 'void f(){}' > conftest.cc
3047 <  if test -z "`${CXX} -instances=static -c conftest.cc 2>&1`"; then
3048 <    echo "$as_me:$LINENO: result: yes" >&5
3049 < echo "${ECHO_T}yes" >&6
3050 <    OOPSE_TEMPLATE_FLAGS="-instances=static"
3051 <  else
3052 <    echo "$as_me:$LINENO: result: no" >&5
3053 < echo "${ECHO_T}no" >&6
3054 <  fi
3055 <  rm -f conftest*
3056 <  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -pto" >&5
3057 < echo $ECHO_N "checking checking whether ${CXX} accepts -pto... $ECHO_C" >&6
3058 <  echo 'void f(){}' > conftest.cc
3059 <  if test -z "`${CXX} -pto -c conftest.cc 2>&1`"; then
3060 <    echo "$as_me:$LINENO: result: yes" >&5
3061 < echo "${ECHO_T}yes" >&6
3062 <    OOPSE_TEMPLATE_FLAGS="-pto"
3063 <  else
3064 <    echo "$as_me:$LINENO: result: no" >&5
3065 < echo "${ECHO_T}no" >&6
3066 <  fi
3067 <  rm -f conftest*
3068 <  echo "$as_me:$LINENO: checking checking whether ${CXX} accepts -LANG:std" >&5
3069 < echo $ECHO_N "checking checking whether ${CXX} accepts -LANG:std... $ECHO_C" >&6
3070 <  echo 'void f(){}' > conftest.cc
3071 <  if test -z "`${CXX} -LANG:std -c conftest.cc 2>&1`"; then
3072 <    echo "$as_me:$LINENO: result: yes" >&5
3073 < echo "${ECHO_T}yes" >&6
3074 <
3075 <
3076 <    EXTRA_CC_FLAG=${EXTRA_CC_FLAG}" -LANG:std"
3077 <  else
3078 <    echo "$as_me:$LINENO: result: no" >&5
3079 < echo "${ECHO_T}no" >&6
3080 <  fi
3081 < fi
3082 <
3083 <
3084 <
3085 <
3086 < ac_ext=f90
3087 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3088 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3089 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3883 > ac_ext=${ac_fc_srcext-f}
3884 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
3885 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
3886 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
3887   if test -n "$ac_tool_prefix"; then
3888 <  for ac_prog in ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
3888 >  for ac_prog in $FC ifort ifc pathf95 pgf95 xlf95 lf95 epcf90 pathf90 xlf90 f95 f90 gfortran g95 fort
3889    do
3890      # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3891   set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3892 < echo "$as_me:$LINENO: checking for $ac_word" >&5
3893 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3894 < if test "${ac_cv_prog_F90+set}" = set; then
3895 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3892 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3893 > $as_echo_n "checking for $ac_word... " >&6; }
3894 > if test "${ac_cv_prog_FC+set}" = set; then :
3895 >  $as_echo_n "(cached) " >&6
3896   else
3897 <  if test -n "$F90"; then
3898 <  ac_cv_prog_F90="$F90" # Let the user override the test.
3897 >  if test -n "$FC"; then
3898 >  ac_cv_prog_FC="$FC" # Let the user override the test.
3899   else
3900   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3901   for as_dir in $PATH
3902   do
3903    IFS=$as_save_IFS
3904    test -z "$as_dir" && as_dir=.
3905 <  for ac_exec_ext in '' $ac_executable_extensions; do
3906 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3907 <    ac_cv_prog_F90="$ac_tool_prefix$ac_prog"
3908 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3905 >    for ac_exec_ext in '' $ac_executable_extensions; do
3906 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3907 >    ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
3908 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3909      break 2
3910    fi
3911   done
3912 < done
3912 >  done
3913 > IFS=$as_save_IFS
3914  
3915   fi
3916   fi
3917 < F90=$ac_cv_prog_F90
3918 < if test -n "$F90"; then
3919 <  echo "$as_me:$LINENO: result: $F90" >&5
3920 < echo "${ECHO_T}$F90" >&6
3917 > FC=$ac_cv_prog_FC
3918 > if test -n "$FC"; then
3919 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5
3920 > $as_echo "$FC" >&6; }
3921   else
3922 <  echo "$as_me:$LINENO: result: no" >&5
3923 < echo "${ECHO_T}no" >&6
3922 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3923 > $as_echo "no" >&6; }
3924   fi
3925  
3926 <    test -n "$F90" && break
3926 >
3927 >    test -n "$FC" && break
3928    done
3929   fi
3930 < if test -z "$F90"; then
3931 <  ac_ct_F90=$F90
3932 <  for ac_prog in ifort ifc f90 xlf90 pgf90 epcf90 f95 xlf95 lf95 fort g95
3930 > if test -z "$FC"; then
3931 >  ac_ct_FC=$FC
3932 >  for ac_prog in $FC ifort ifc pathf95 pgf95 xlf95 lf95 epcf90 pathf90 xlf90 f95 f90 gfortran g95 fort
3933   do
3934    # Extract the first word of "$ac_prog", so it can be a program name with args.
3935   set dummy $ac_prog; ac_word=$2
3936 < echo "$as_me:$LINENO: checking for $ac_word" >&5
3937 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3938 < if test "${ac_cv_prog_ac_ct_F90+set}" = set; then
3939 <  echo $ECHO_N "(cached) $ECHO_C" >&6
3936 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3937 > $as_echo_n "checking for $ac_word... " >&6; }
3938 > if test "${ac_cv_prog_ac_ct_FC+set}" = set; then :
3939 >  $as_echo_n "(cached) " >&6
3940   else
3941 <  if test -n "$ac_ct_F90"; then
3942 <  ac_cv_prog_ac_ct_F90="$ac_ct_F90" # Let the user override the test.
3941 >  if test -n "$ac_ct_FC"; then
3942 >  ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test.
3943   else
3944   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3945   for as_dir in $PATH
3946   do
3947    IFS=$as_save_IFS
3948    test -z "$as_dir" && as_dir=.
3949 <  for ac_exec_ext in '' $ac_executable_extensions; do
3950 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3951 <    ac_cv_prog_ac_ct_F90="$ac_prog"
3952 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3949 >    for ac_exec_ext in '' $ac_executable_extensions; do
3950 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3951 >    ac_cv_prog_ac_ct_FC="$ac_prog"
3952 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3953      break 2
3954    fi
3955   done
3956 < done
3956 >  done
3957 > IFS=$as_save_IFS
3958  
3959   fi
3960   fi
3961 < ac_ct_F90=$ac_cv_prog_ac_ct_F90
3962 < if test -n "$ac_ct_F90"; then
3963 <  echo "$as_me:$LINENO: result: $ac_ct_F90" >&5
3964 < echo "${ECHO_T}$ac_ct_F90" >&6
3961 > ac_ct_FC=$ac_cv_prog_ac_ct_FC
3962 > if test -n "$ac_ct_FC"; then
3963 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5
3964 > $as_echo "$ac_ct_FC" >&6; }
3965   else
3966 <  echo "$as_me:$LINENO: result: no" >&5
3967 < echo "${ECHO_T}no" >&6
3966 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3967 > $as_echo "no" >&6; }
3968   fi
3969  
3970 <  test -n "$ac_ct_F90" && break
3970 >
3971 >  test -n "$ac_ct_FC" && break
3972   done
3973  
3974 <  F90=$ac_ct_F90
3974 >  if test "x$ac_ct_FC" = x; then
3975 >    FC=""
3976 >  else
3977 >    case $cross_compiling:$ac_tool_warned in
3978 > yes:)
3979 > { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3980 > $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3981 > ac_tool_warned=yes ;;
3982 > esac
3983 >    FC=$ac_ct_FC
3984 >  fi
3985   fi
3986  
3987  
3988 < # If we don't use `.F90' as extension, the preprocessor is not run on the
3989 < # input file.
3988 > # Provide some information about the compiler.
3989 > $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5
3990 > set X $ac_compile
3991 > ac_compiler=$2
3992 > for ac_option in --version -v -V -qversion; do
3993 >  { { ac_try="$ac_compiler $ac_option >&5"
3994 > case "(($ac_try" in
3995 >  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3996 >  *) ac_try_echo=$ac_try;;
3997 > esac
3998 > eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3999 > $as_echo "$ac_try_echo"; } >&5
4000 >  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4001 >  ac_status=$?
4002 >  if test -s conftest.err; then
4003 >    sed '10a\
4004 > ... rest of stderr output deleted ...
4005 >         10q' conftest.err >conftest.er1
4006 >    cat conftest.er1 >&5
4007 >  fi
4008 >  rm -f conftest.er1 conftest.err
4009 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4010 >  test $ac_status = 0; }
4011 > done
4012 > rm -f a.out
4013 >
4014 > # If we don't use `.F' as extension, the preprocessor is not run on the
4015 > # input file.  (Note that this only needs to work for GNU compilers.)
4016   ac_save_ext=$ac_ext
4017 < ac_ext=F90
4018 < echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 90 compiler" >&5
4019 < echo $ECHO_N "checking whether we are using the GNU Fortran 90 compiler... $ECHO_C" >&6
4020 < if test "${ac_cv_f90_compiler_gnu+set}" = set; then
4021 <  echo $ECHO_N "(cached) $ECHO_C" >&6
4017 > ac_ext=F
4018 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5
4019 > $as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
4020 > if test "${ac_cv_fc_compiler_gnu+set}" = set; then :
4021 >  $as_echo_n "(cached) " >&6
4022   else
4023 <  cat >conftest.$ac_ext <<_ACEOF
4024 <
3188 < program main
3189 <
4023 >  cat > conftest.$ac_ext <<_ACEOF
4024 >      program main
4025   #ifndef __GNUC__
4026         choke me
4027   #endif
4028  
4029 < end program main
3195 <
4029 >      end
4030   _ACEOF
4031 < rm -f conftest.$ac_objext
3198 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3199 <  (eval $ac_compile) 2>conftest.er1
3200 <  ac_status=$?
3201 <  grep -v '^ *+' conftest.er1 >conftest.err
3202 <  rm -f conftest.er1
3203 <  cat conftest.err >&5
3204 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3205 <  (exit $ac_status); } &&
3206 <         { ac_try='test -z "$ac_f90_werror_flag"
3207 <                         || test ! -s conftest.err'
3208 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3209 <  (eval $ac_try) 2>&5
3210 <  ac_status=$?
3211 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3212 <  (exit $ac_status); }; } &&
3213 <         { ac_try='test -s conftest.$ac_objext'
3214 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3215 <  (eval $ac_try) 2>&5
3216 <  ac_status=$?
3217 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3218 <  (exit $ac_status); }; }; then
4031 > if ac_fn_fc_try_compile "$LINENO"; then :
4032    ac_compiler_gnu=yes
4033   else
4034 <  echo "$as_me: failed program was:" >&5
3222 < sed 's/^/| /' conftest.$ac_ext >&5
3223 <
3224 < ac_compiler_gnu=no
4034 >  ac_compiler_gnu=no
4035   fi
4036 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4037 < ac_cv_f90_compiler_gnu=$ac_compiler_gnu
4036 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4037 > ac_cv_fc_compiler_gnu=$ac_compiler_gnu
4038  
4039   fi
4040 < echo "$as_me:$LINENO: result: $ac_cv_f90_compiler_gnu" >&5
4041 < echo "${ECHO_T}$ac_cv_f90_compiler_gnu" >&6
4040 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5
4041 > $as_echo "$ac_cv_fc_compiler_gnu" >&6; }
4042   ac_ext=$ac_save_ext
4043 < G95=`test $ac_compiler_gnu = yes && echo yes`
4043 > ac_test_FCFLAGS=${FCFLAGS+set}
4044 > ac_save_FCFLAGS=$FCFLAGS
4045 > FCFLAGS=
4046 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5
4047 > $as_echo_n "checking whether $FC accepts -g... " >&6; }
4048 > if test "${ac_cv_prog_fc_g+set}" = set; then :
4049 >  $as_echo_n "(cached) " >&6
4050 > else
4051 >  FCFLAGS=-g
4052 > cat > conftest.$ac_ext <<_ACEOF
4053 >      program main
4054 >
4055 >      end
4056 > _ACEOF
4057 > if ac_fn_fc_try_compile "$LINENO"; then :
4058 >  ac_cv_prog_fc_g=yes
4059 > else
4060 >  ac_cv_prog_fc_g=no
4061 > fi
4062 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4063 >
4064 > fi
4065 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5
4066 > $as_echo "$ac_cv_prog_fc_g" >&6; }
4067 > if test "$ac_test_FCFLAGS" = set; then
4068 >  FCFLAGS=$ac_save_FCFLAGS
4069 > elif test $ac_cv_prog_fc_g = yes; then
4070 >  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
4071 >    FCFLAGS="-g -O2"
4072 >  else
4073 >    FCFLAGS="-g"
4074 >  fi
4075 > else
4076 >  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
4077 >    FCFLAGS="-O2"
4078 >  else
4079 >    FCFLAGS=
4080 >  fi
4081 > fi
4082 >
4083   ac_ext=c
4084   ac_cpp='$CPP $CPPFLAGS'
4085   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
# Line 3238 | Line 4087 | ac_compiler_gnu=$ac_cv_c_compiler_gnu
4087   ac_compiler_gnu=$ac_cv_c_compiler_gnu
4088  
4089  
4090 + save_CXX=$CXX
4091 + save_CC=$CC
4092 + save_FC=$FC
4093 + save_LIBS=$LIBS
4094  
4095 + ac_ext=cpp
4096 + ac_cpp='$CXXCPP $CPPFLAGS'
4097 + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4098 + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4099 + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4100  
4101  
3244 # Try to determine native compiler flags that allow us to use F90 suffix
3245 # for preprocessed f90 source.
4102  
3247 if test "$ac_test_PREPFLAG" != "set"; then
3248  PREPFLAG=""
3249  case "${host_cpu}-${host_os}" in
4103  
3251  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
3252                    PREPFLAG="-fpp1 "
3253                fi;;
3254  *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
3255                    PREPFLAG="-qsuffix=cpp=F90 "
3256                fi;;
3257  *darwin*)
3258        if test "$F90" = f90 -o "$F90" = xlf90; then
3259                PREPFLAG="-qsuffix=cpp=F90 "
3260        fi;;
3261  esac
4104  
3263  if test -z "$PREPFLAG"; then
3264        { echo "$as_me:$LINENO: WARNING: \"Using empty PREPFLAG\"" >&5
3265 echo "$as_me: WARNING: \"Using empty PREPFLAG\"" >&2;}
3266        PREPFLAG=""
3267  fi
4105  
3269  echo "$as_me:$LINENO: checking to make sure F90 preprocessor flag works" >&5
3270 echo $ECHO_N "checking to make sure F90 preprocessor flag works... $ECHO_C" >&6
4106  
4107 +        for ac_prog in openmpicxx openmpiCC openmpic++ mpic++ mpicxx mpiCC hcp mpxlC_r mpxlC mpCC cmpic++
4108 + do
4109 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
4110 + set dummy $ac_prog; ac_word=$2
4111 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4112 + $as_echo_n "checking for $ac_word... " >&6; }
4113 + if test "${ac_cv_prog_MPICXX+set}" = set; then :
4114 +  $as_echo_n "(cached) " >&6
4115 + else
4116 +  if test -n "$MPICXX"; then
4117 +  ac_cv_prog_MPICXX="$MPICXX" # Let the user override the test.
4118 + else
4119 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4120 + for as_dir in $PATH
4121 + do
4122 +  IFS=$as_save_IFS
4123 +  test -z "$as_dir" && as_dir=.
4124 +    for ac_exec_ext in '' $ac_executable_extensions; do
4125 +  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4126 +    ac_cv_prog_MPICXX="$ac_prog"
4127 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4128 +    break 2
4129 +  fi
4130 + done
4131 +  done
4132 + IFS=$as_save_IFS
4133  
4134 <  ac_ext=f90
4135 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4136 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4137 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4134 > fi
4135 > fi
4136 > MPICXX=$ac_cv_prog_MPICXX
4137 > if test -n "$MPICXX"; then
4138 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICXX" >&5
4139 > $as_echo "$MPICXX" >&6; }
4140 > else
4141 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4142 > $as_echo "no" >&6; }
4143 > fi
4144  
3278  ac_save_ext=$ac_ext
3279  ac_ext=F90
3280  ac_save_F90FLAGS=$F90FLAGS
4145  
4146 <  if test "$PREPFLAG"; then
4147 <  F90FLAGS="${F90FLAGS} ${PREPFLAG}-DTEST"
4148 < fi
4146 >  test -n "$MPICXX" && break
4147 > done
4148 > test -n "$MPICXX" || MPICXX="$CXX"
4149  
4150 <    cat >conftest.$ac_ext <<_ACEOF
4150 >        ax_mpi_save_CXX="$CXX"
4151 >        CXX="$MPICXX"
4152  
4153  
3289 program main
4154  
4155 <  integer :: i
4156 <  i = 1
4155 > if test x = x"$MPILIBS"; then
4156 >        ac_fn_cxx_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init"
4157 > if test "x$ac_cv_func_MPI_Init" = x""yes; then :
4158 >  MPILIBS=" "
4159 > fi
4160  
4161 + fi
4162  
4163 < end program main
4163 > if test x = x"$MPILIBS"; then
4164 >        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5
4165 > $as_echo_n "checking for MPI_Init in -lmpi... " >&6; }
4166 > if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then :
4167 >  $as_echo_n "(cached) " >&6
4168 > else
4169 >  ac_check_lib_save_LIBS=$LIBS
4170 > LIBS="-lmpi  $LIBS"
4171 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4172 > /* end confdefs.h.  */
4173  
4174 < _ACEOF
4175 < rm -f conftest.$ac_objext
4176 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4177 <  (eval $ac_compile) 2>conftest.er1
4178 <  ac_status=$?
4179 <  grep -v '^ *+' conftest.er1 >conftest.err
4180 <  rm -f conftest.er1
4181 <  cat conftest.err >&5
4182 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4183 <  (exit $ac_status); } &&
4184 <         { ac_try='test -z "$ac_f90_werror_flag"
4185 <                         || test ! -s conftest.err'
4186 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4187 <  (eval $ac_try) 2>&5
4188 <  ac_status=$?
4189 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4190 <  (exit $ac_status); }; } &&
3314 <         { ac_try='test -s conftest.$ac_objext'
3315 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3316 <  (eval $ac_try) 2>&5
3317 <  ac_status=$?
3318 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3319 <  (exit $ac_status); }; }; then
3320 <  prepflagworks=1
4174 > /* Override any GCC internal prototype to avoid an error.
4175 >   Use char because int might match the return type of a GCC
4176 >   builtin and then its argument prototype would still apply.  */
4177 > #ifdef __cplusplus
4178 > extern "C"
4179 > #endif
4180 > char MPI_Init ();
4181 > int
4182 > main ()
4183 > {
4184 > return MPI_Init ();
4185 >  ;
4186 >  return 0;
4187 > }
4188 > _ACEOF
4189 > if ac_fn_cxx_try_link "$LINENO"; then :
4190 >  ac_cv_lib_mpi_MPI_Init=yes
4191   else
4192 <  echo "$as_me: failed program was:" >&5
4193 < sed 's/^/| /' conftest.$ac_ext >&5
4192 >  ac_cv_lib_mpi_MPI_Init=no
4193 > fi
4194 > rm -f core conftest.err conftest.$ac_objext \
4195 >    conftest$ac_exeext conftest.$ac_ext
4196 > LIBS=$ac_check_lib_save_LIBS
4197 > fi
4198 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5
4199 > $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; }
4200 > if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then :
4201 >  MPILIBS="-lmpi"
4202 > fi
4203  
3325 prepflagworks=0
4204   fi
4205 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4205 > if test x = x"$MPILIBS"; then
4206 >        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5
4207 > $as_echo_n "checking for MPI_Init in -lmpich... " >&6; }
4208 > if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then :
4209 >  $as_echo_n "(cached) " >&6
4210 > else
4211 >  ac_check_lib_save_LIBS=$LIBS
4212 > LIBS="-lmpich  $LIBS"
4213 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4214 > /* end confdefs.h.  */
4215  
4216 <  F90FLAGS=$ac_save_F90FLAGS
4217 <  ac_ext=$ac_save_ext
4218 <  ac_ext=c
4219 < ac_cpp='$CPP $CPPFLAGS'
4220 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4221 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4222 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
4216 > /* Override any GCC internal prototype to avoid an error.
4217 >   Use char because int might match the return type of a GCC
4218 >   builtin and then its argument prototype would still apply.  */
4219 > #ifdef __cplusplus
4220 > extern "C"
4221 > #endif
4222 > char MPI_Init ();
4223 > int
4224 > main ()
4225 > {
4226 > return MPI_Init ();
4227 >  ;
4228 >  return 0;
4229 > }
4230 > _ACEOF
4231 > if ac_fn_cxx_try_link "$LINENO"; then :
4232 >  ac_cv_lib_mpich_MPI_Init=yes
4233 > else
4234 >  ac_cv_lib_mpich_MPI_Init=no
4235 > fi
4236 > rm -f core conftest.err conftest.$ac_objext \
4237 >    conftest$ac_exeext conftest.$ac_ext
4238 > LIBS=$ac_check_lib_save_LIBS
4239 > fi
4240 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5
4241 > $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; }
4242 > if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then :
4243 >  MPILIBS="-lmpich"
4244 > fi
4245  
4246 + fi
4247  
4248 <  if test "$prepflagworks" = 1; then
4249 <    echo "$as_me:$LINENO: result: yes" >&5
4250 < echo "${ECHO_T}yes" >&6
4248 > if test x != x"$MPILIBS"; then
4249 >        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5
4250 > $as_echo_n "checking for mpi.h... " >&6; }
4251 >        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4252 > /* end confdefs.h.  */
4253 > #include <mpi.h>
4254 > int
4255 > main ()
4256 > {
4257  
4258 <  else
4259 <    echo "$as_me:$LINENO: result: no" >&5
4260 < echo "${ECHO_T}no" >&6
4261 <    { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor flag" >&5
4262 < echo "$as_me: error: Can't figure out working Fortran90 preprocessor flag" >&2;}
4263 <   { (exit 1); exit 1; }; }
4264 <  fi
4258 >  ;
4259 >  return 0;
4260 > }
4261 > _ACEOF
4262 > if ac_fn_cxx_try_compile "$LINENO"; then :
4263 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4264 > $as_echo "yes" >&6; }
4265 > else
4266 >  MPILIBS=""
4267 >                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4268 > $as_echo "no" >&6; }
4269   fi
4270 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4271 + fi
4272  
4273 + CXX="$ax_mpi_save_CXX"
4274  
4275  
4276  
4277 + # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
4278 + if test x = x"$MPILIBS"; then
4279 +        USE_MPI="no"
4280 +       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No suitable C++ MPI implementation found. openmd_MPI will not be built." >&5
4281 + $as_echo "$as_me: WARNING: No suitable C++ MPI implementation found. openmd_MPI will not be built." >&2;}
4282 +        :
4283 + else
4284 +        USE_MPI="yes"
4285 +        :
4286 + fi
4287  
3355 # Try to determine native compiler flags that allow us to use F90 suffix
3356 # for preprocessed f90 source with -D type defines
4288  
4289 < if test "$ac_test_PREPDEFFLAG" != "set"; then
3359 <  PREPDEFFLAG=""
3360 <  case "${host_cpu}-${host_os}" in
4289 > if test $USE_MPI != no; then :
4290  
4291 <  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
4292 <                    PREPDEFFLAG=" "
4293 <                fi;;
4294 <  *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
4295 <                    PREPDEFFLAG="-WF,"
3367 <                fi;;
3368 <  *darwin*)
3369 <        if test "$F90" = f90 -o "$F90" = xlf90; then
3370 <                PREPDEFFLAG="-WF,"
3371 <        fi;;
3372 <  esac
4291 > ac_ext=c
4292 > ac_cpp='$CPP $CPPFLAGS'
4293 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4294 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4295 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
4296  
3374  if test -z "$PREPDEFFLAG"; then
3375        { echo "$as_me:$LINENO: WARNING: \"Using empty PREPDEFFLAG\"" >&5
3376 echo "$as_me: WARNING: \"Using empty PREPDEFFLAG\"" >&2;}
3377        PREPDEFFLAG=" "
3378  fi
4297  
3380  echo "$as_me:$LINENO: checking to make sure F90 preprocessor define flag works" >&5
3381 echo $ECHO_N "checking to make sure F90 preprocessor define flag works... $ECHO_C" >&6
4298  
4299  
3384  ac_ext=f90
3385 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3386 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3387 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4300  
3389  ac_save_ext=$ac_ext
3390  ac_ext=F90
3391  ac_save_F90FLAGS=$F90FLAGS
4301  
4302 <  if test "$PREPDEFFLAG"; then
4303 <  F90FLAGS="${F90FLAGS} ${PREPFLAG} ${PREPDEFFLAG}-DTEST"
4302 >        for ac_prog in openmpicc mpicc hcc mpxlc_r mpxlc mpcc cmpicc
4303 > do
4304 >  # Extract the first word of "$ac_prog", so it can be a program name with args.
4305 > set dummy $ac_prog; ac_word=$2
4306 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4307 > $as_echo_n "checking for $ac_word... " >&6; }
4308 > if test "${ac_cv_prog_MPICC+set}" = set; then :
4309 >  $as_echo_n "(cached) " >&6
4310 > else
4311 >  if test -n "$MPICC"; then
4312 >  ac_cv_prog_MPICC="$MPICC" # Let the user override the test.
4313 > else
4314 > as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4315 > for as_dir in $PATH
4316 > do
4317 >  IFS=$as_save_IFS
4318 >  test -z "$as_dir" && as_dir=.
4319 >    for ac_exec_ext in '' $ac_executable_extensions; do
4320 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4321 >    ac_cv_prog_MPICC="$ac_prog"
4322 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4323 >    break 2
4324 >  fi
4325 > done
4326 >  done
4327 > IFS=$as_save_IFS
4328 >
4329   fi
4330 + fi
4331 + MPICC=$ac_cv_prog_MPICC
4332 + if test -n "$MPICC"; then
4333 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC" >&5
4334 + $as_echo "$MPICC" >&6; }
4335 + else
4336 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4337 + $as_echo "no" >&6; }
4338 + fi
4339  
3397    cat >conftest.$ac_ext <<_ACEOF
4340  
4341 +  test -n "$MPICC" && break
4342 + done
4343 + test -n "$MPICC" || MPICC="$CC"
4344  
4345 < program main
4345 >        ax_mpi_save_CC="$CC"
4346 >        CC="$MPICC"
4347  
3402  integer :: i
3403 #ifdef TEST
3404  i = 1
3405 #else
3406  choke me
3407 #endif
4348  
4349  
4350 < end program main
4350 > if test x = x"$MPILIBS"; then
4351 >        ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init"
4352 > if test "x$ac_cv_func_MPI_Init" = x""yes; then :
4353 >  MPILIBS=" "
4354 > fi
4355  
3412 _ACEOF
3413 rm -f conftest.$ac_objext
3414 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3415  (eval $ac_compile) 2>conftest.er1
3416  ac_status=$?
3417  grep -v '^ *+' conftest.er1 >conftest.err
3418  rm -f conftest.er1
3419  cat conftest.err >&5
3420  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3421  (exit $ac_status); } &&
3422         { ac_try='test -z "$ac_f90_werror_flag"
3423                         || test ! -s conftest.err'
3424  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3425  (eval $ac_try) 2>&5
3426  ac_status=$?
3427  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3428  (exit $ac_status); }; } &&
3429         { ac_try='test -s conftest.$ac_objext'
3430  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3431  (eval $ac_try) 2>&5
3432  ac_status=$?
3433  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3434  (exit $ac_status); }; }; then
3435  prepdefflagworks=1
3436 else
3437  echo "$as_me: failed program was:" >&5
3438 sed 's/^/| /' conftest.$ac_ext >&5
3439
3440 prepdefflagworks=0
4356   fi
3442 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4357  
4358 <  F90FLAGS=$ac_save_F90FLAGS
4359 <  ac_ext=$ac_save_ext
4360 <  ac_ext=c
4361 < ac_cpp='$CPP $CPPFLAGS'
4362 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4363 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4364 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
4358 > if test x = x"$MPILIBS"; then
4359 >        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5
4360 > $as_echo_n "checking for MPI_Init in -lmpi... " >&6; }
4361 > if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then :
4362 >  $as_echo_n "(cached) " >&6
4363 > else
4364 >  ac_check_lib_save_LIBS=$LIBS
4365 > LIBS="-lmpi  $LIBS"
4366 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4367 > /* end confdefs.h.  */
4368  
4369 + /* Override any GCC internal prototype to avoid an error.
4370 +   Use char because int might match the return type of a GCC
4371 +   builtin and then its argument prototype would still apply.  */
4372 + #ifdef __cplusplus
4373 + extern "C"
4374 + #endif
4375 + char MPI_Init ();
4376 + int
4377 + main ()
4378 + {
4379 + return MPI_Init ();
4380 +  ;
4381 +  return 0;
4382 + }
4383 + _ACEOF
4384 + if ac_fn_c_try_link "$LINENO"; then :
4385 +  ac_cv_lib_mpi_MPI_Init=yes
4386 + else
4387 +  ac_cv_lib_mpi_MPI_Init=no
4388 + fi
4389 + rm -f core conftest.err conftest.$ac_objext \
4390 +    conftest$ac_exeext conftest.$ac_ext
4391 + LIBS=$ac_check_lib_save_LIBS
4392 + fi
4393 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5
4394 + $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; }
4395 + if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then :
4396 +  MPILIBS="-lmpi"
4397 + fi
4398  
4399 + fi
4400 + if test x = x"$MPILIBS"; then
4401 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5
4402 + $as_echo_n "checking for MPI_Init in -lmpich... " >&6; }
4403 + if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then :
4404 +  $as_echo_n "(cached) " >&6
4405 + else
4406 +  ac_check_lib_save_LIBS=$LIBS
4407 + LIBS="-lmpich  $LIBS"
4408 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409 + /* end confdefs.h.  */
4410  
4411 <  if test "$prepdefflagworks" = 1; then
4412 <    echo "$as_me:$LINENO: result: yes" >&5
4413 < echo "${ECHO_T}yes" >&6
4411 > /* Override any GCC internal prototype to avoid an error.
4412 >   Use char because int might match the return type of a GCC
4413 >   builtin and then its argument prototype would still apply.  */
4414 > #ifdef __cplusplus
4415 > extern "C"
4416 > #endif
4417 > char MPI_Init ();
4418 > int
4419 > main ()
4420 > {
4421 > return MPI_Init ();
4422 >  ;
4423 >  return 0;
4424 > }
4425 > _ACEOF
4426 > if ac_fn_c_try_link "$LINENO"; then :
4427 >  ac_cv_lib_mpich_MPI_Init=yes
4428 > else
4429 >  ac_cv_lib_mpich_MPI_Init=no
4430 > fi
4431 > rm -f core conftest.err conftest.$ac_objext \
4432 >    conftest$ac_exeext conftest.$ac_ext
4433 > LIBS=$ac_check_lib_save_LIBS
4434 > fi
4435 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5
4436 > $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; }
4437 > if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then :
4438 >  MPILIBS="-lmpich"
4439 > fi
4440  
3458  else
3459    echo "$as_me:$LINENO: result: no" >&5
3460 echo "${ECHO_T}no" >&6
3461    { { echo "$as_me:$LINENO: error: Can't figure out working Fortran90 preprocessor define flag" >&5
3462 echo "$as_me: error: Can't figure out working Fortran90 preprocessor define flag" >&2;}
3463   { (exit 1); exit 1; }; }
3464  fi
4441   fi
4442  
4443 < ac_ext=f90
4444 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4445 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4446 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4443 > if test x != x"$MPILIBS"; then
4444 >        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5
4445 > $as_echo_n "checking for mpi.h... " >&6; }
4446 >        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4447 > /* end confdefs.h.  */
4448 > #include <mpi.h>
4449 > int
4450 > main ()
4451 > {
4452  
4453 <
4454 <
4455 < ac_ext=f90
4456 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4457 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4458 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4459 < echo "$as_me:$LINENO: checking how to get verbose linking output from $F90" >&5
3479 < echo $ECHO_N "checking how to get verbose linking output from $F90... $ECHO_C" >&6
3480 < if test "${ac_cv_prog_f90_v+set}" = set; then
3481 <  echo $ECHO_N "(cached) $ECHO_C" >&6
4453 >  ;
4454 >  return 0;
4455 > }
4456 > _ACEOF
4457 > if ac_fn_c_try_compile "$LINENO"; then :
4458 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4459 > $as_echo "yes" >&6; }
4460   else
4461 +  MPILIBS=""
4462 +                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4463 + $as_echo "no" >&6; }
4464 + fi
4465 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4466 + fi
4467  
4468 < cat >conftest.$ac_ext <<_ACEOF
4468 > CC="$ax_mpi_save_CC"
4469  
3486 program main
4470  
4471  
4472 < end program main
4472 > # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
4473 > if test x = x"$MPILIBS"; then
4474 >        USE_MPI="no"
4475 >       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No suitable C MPI implementation found. openmd_MPI will not be built." >&5
4476 > $as_echo "$as_me: WARNING: No suitable C MPI implementation found. openmd_MPI will not be built." >&2;}
4477 >        :
4478 > else
4479 >        USE_MPI="yes"
4480 >        :
4481 > fi
4482  
3491 _ACEOF
3492 rm -f conftest.$ac_objext
3493 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3494  (eval $ac_compile) 2>conftest.er1
3495  ac_status=$?
3496  grep -v '^ *+' conftest.er1 >conftest.err
3497  rm -f conftest.er1
3498  cat conftest.err >&5
3499  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3500  (exit $ac_status); } &&
3501         { ac_try='test -z "$ac_f90_werror_flag"
3502                         || test ! -s conftest.err'
3503  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3504  (eval $ac_try) 2>&5
3505  ac_status=$?
3506  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3507  (exit $ac_status); }; } &&
3508         { ac_try='test -s conftest.$ac_objext'
3509  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3510  (eval $ac_try) 2>&5
3511  ac_status=$?
3512  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3513  (exit $ac_status); }; }; then
3514  ac_cv_prog_f90_v=
3515 # Try some options frequently used verbose output
3516 for ac_verb in -v -verbose --verbose -V -\#\#\#; do
3517  ac_ext=f90
3518 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3519 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3520 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4483  
4484 < cat >conftest.$ac_ext <<_ACEOF
4484 > fi
4485  
4486 < program main
4486 > if test $USE_MPI != no; then :
4487  
4488 + ac_ext=${ac_fc_srcext-f}
4489 + ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
4490 + ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
4491 + ac_compiler_gnu=$ac_cv_fc_compiler_gnu
4492  
3527 end program main
4493  
3529 _ACEOF
4494  
3531 # Compile and link our simple test program by passing a flag (argument
3532 # 1 to this macro) to the Fortran 90 compiler in order to get
3533 # "verbose" output that we can then parse for the Fortran 90 linker
3534 # flags.
3535 ac_save_F90FLAGS=$F90FLAGS
3536 F90FLAGS="$F90FLAGS $ac_verb"
4495  
3538 (eval echo $as_me:3538: \"$ac_link\") >&5
3539 ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
3540 echo "$ac_f90_v_output" >&5
3541 F90FLAGS=$ac_save_F90FLAGS
4496  
3543 rm -f conftest.*
3544 ac_ext=f90
3545 ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
3546 ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3547 ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4497  
4498 < # If we are using xlf then replace all the commas with spaces.
4499 < if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
4500 <  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
4501 < fi
4498 >        for ac_prog in openmpif90 mpif90 mpxlf95_r mpxlf90_r mpxlf95 mpxlf90 mpf90 cmpif90c
4499 > do
4500 >  # Extract the first word of "$ac_prog", so it can be a program name with args.
4501 > set dummy $ac_prog; ac_word=$2
4502 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4503 > $as_echo_n "checking for $ac_word... " >&6; }
4504 > if test "${ac_cv_prog_MPIFC+set}" = set; then :
4505 >  $as_echo_n "(cached) " >&6
4506 > else
4507 >  if test -n "$MPIFC"; then
4508 >  ac_cv_prog_MPIFC="$MPIFC" # Let the user override the test.
4509 > else
4510 > as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4511 > for as_dir in $PATH
4512 > do
4513 >  IFS=$as_save_IFS
4514 >  test -z "$as_dir" && as_dir=.
4515 >    for ac_exec_ext in '' $ac_executable_extensions; do
4516 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4517 >    ac_cv_prog_MPIFC="$ac_prog"
4518 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4519 >    break 2
4520 >  fi
4521 > done
4522 >  done
4523 > IFS=$as_save_IFS
4524  
3554 # If we are using Cray Fortran then delete quotes.
3555 # Use "\"" instead of '"' for font-lock-mode.
3556 # FIXME: a more general fix for quoted arguments with spaces?
3557 if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
3558  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
4525   fi
3560  # look for -l* and *.a constructs in the output
3561  for ac_arg in $ac_f90_v_output; do
3562     case $ac_arg in
3563        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
3564          ac_cv_prog_f90_v=$ac_verb
3565          break 2 ;;
3566     esac
3567  done
3568 done
3569 if test -z "$ac_cv_prog_f90_v"; then
3570   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F90" >&5
3571 echo "$as_me: WARNING: cannot determine how to obtain linking information from $F90" >&2;}
4526   fi
4527 + MPIFC=$ac_cv_prog_MPIFC
4528 + if test -n "$MPIFC"; then
4529 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC" >&5
4530 + $as_echo "$MPIFC" >&6; }
4531   else
4532 <  echo "$as_me: failed program was:" >&5
4533 < sed 's/^/| /' conftest.$ac_ext >&5
3576 <
3577 < { echo "$as_me:$LINENO: WARNING: compilation failed" >&5
3578 < echo "$as_me: WARNING: compilation failed" >&2;}
4532 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533 > $as_echo "no" >&6; }
4534   fi
3580 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4535  
3582 fi
3583 echo "$as_me:$LINENO: result: $ac_cv_prog_f90_v" >&5
3584 echo "${ECHO_T}$ac_cv_prog_f90_v" >&6
3585 echo "$as_me:$LINENO: checking for Fortran 90 libraries" >&5
3586 echo $ECHO_N "checking for Fortran 90 libraries... $ECHO_C" >&6
3587 if test "${ac_cv_flibs+set}" = set; then
3588  echo $ECHO_N "(cached) $ECHO_C" >&6
3589 else
3590  if test "x$F90LIBS" != "x"; then
3591  ac_cv_f90libs="$F90LIBS" # Let the user override the test.
3592 else
4536  
4537 < ac_ext=f90
4538 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4539 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3597 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4537 >  test -n "$MPIFC" && break
4538 > done
4539 > test -n "$MPIFC" || MPIFC="$FC"
4540  
4541 < cat >conftest.$ac_ext <<_ACEOF
4541 >        ax_mpi_save_FC="$FC"
4542 >        FC="$MPIFC"
4543  
3601 program main
4544  
4545  
4546 < end program main
4547 <
4546 > if test x = x"$MPILIBS"; then
4547 >        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5
4548 > $as_echo_n "checking for MPI_Init... " >&6; }
4549 >                        cat > conftest.$ac_ext <<_ACEOF
4550 >      program main
4551 >      call MPI_Init
4552 >      end
4553   _ACEOF
4554 + if ac_fn_fc_try_link "$LINENO"; then :
4555 +  MPILIBS=" "
4556 +                                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4557 + $as_echo "yes" >&6; }
4558 + else
4559 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4560 + $as_echo "no" >&6; }
4561 + fi
4562 + rm -f core conftest.err conftest.$ac_objext \
4563 +    conftest$ac_exeext conftest.$ac_ext
4564 + fi
4565  
4566 < # Compile and link our simple test program by passing a flag (argument
4567 < # 1 to this macro) to the Fortran 90 compiler in order to get
4568 < # "verbose" output that we can then parse for the Fortran 90 linker
4569 < # flags.
4570 < ac_save_F90FLAGS=$F90FLAGS
4571 < F90FLAGS="$F90FLAGS $ac_cv_prog_f90_v"
4572 <
4573 < (eval echo $as_me:3615: \"$ac_link\") >&5
4574 < ac_f90_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
4575 < echo "$ac_f90_v_output" >&5
4576 < F90FLAGS=$ac_save_F90FLAGS
4577 <
4578 < rm -f conftest.*
4579 < ac_ext=f90
4580 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4581 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4582 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
3625 <
3626 < # If we are using xlf then replace all the commas with spaces.
3627 < if echo $ac_f90_v_output | grep xlfentry >/dev/null 2>&1; then
3628 <  ac_f90_v_output=`echo $ac_f90_v_output | sed 's/,/ /g'`
4566 >        if test x = x"$MPILIBS"; then
4567 >                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lfmpi" >&5
4568 > $as_echo_n "checking for MPI_Init in -lfmpi... " >&6; }
4569 > if test "${ac_cv_lib_fmpi_MPI_Init+set}" = set; then :
4570 >  $as_echo_n "(cached) " >&6
4571 > else
4572 >  ac_check_lib_save_LIBS=$LIBS
4573 > LIBS="-lfmpi  $LIBS"
4574 > cat > conftest.$ac_ext <<_ACEOF
4575 >      program main
4576 >      call MPI_Init
4577 >      end
4578 > _ACEOF
4579 > if ac_fn_fc_try_link "$LINENO"; then :
4580 >  ac_cv_lib_fmpi_MPI_Init=yes
4581 > else
4582 >  ac_cv_lib_fmpi_MPI_Init=no
4583   fi
4584 + rm -f core conftest.err conftest.$ac_objext \
4585 +    conftest$ac_exeext conftest.$ac_ext
4586 + LIBS=$ac_check_lib_save_LIBS
4587 + fi
4588 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmpi_MPI_Init" >&5
4589 + $as_echo "$ac_cv_lib_fmpi_MPI_Init" >&6; }
4590 + if test "x$ac_cv_lib_fmpi_MPI_Init" = x""yes; then :
4591 +  MPILIBS="-lfmpi"
4592 + fi
4593  
4594 < # If we are using Cray Fortran then delete quotes.
4595 < # Use "\"" instead of '"' for font-lock-mode.
4596 < # FIXME: a more general fix for quoted arguments with spaces?
4597 < if echo $ac_f90_v_output | grep cft90 >/dev/null 2>&1; then
4598 <  ac_f90_v_output=`echo $ac_f90_v_output | sed "s/\"//g"`
4594 >        fi
4595 >        if test x = x"$MPILIBS"; then
4596 >                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpichf90" >&5
4597 > $as_echo_n "checking for MPI_Init in -lmpichf90... " >&6; }
4598 > if test "${ac_cv_lib_mpichf90_MPI_Init+set}" = set; then :
4599 >  $as_echo_n "(cached) " >&6
4600 > else
4601 >  ac_check_lib_save_LIBS=$LIBS
4602 > LIBS="-lmpichf90  $LIBS"
4603 > cat > conftest.$ac_ext <<_ACEOF
4604 >      program main
4605 >      call MPI_Init
4606 >      end
4607 > _ACEOF
4608 > if ac_fn_fc_try_link "$LINENO"; then :
4609 >  ac_cv_lib_mpichf90_MPI_Init=yes
4610 > else
4611 >  ac_cv_lib_mpichf90_MPI_Init=no
4612   fi
4613 + rm -f core conftest.err conftest.$ac_objext \
4614 +    conftest$ac_exeext conftest.$ac_ext
4615 + LIBS=$ac_check_lib_save_LIBS
4616 + fi
4617 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpichf90_MPI_Init" >&5
4618 + $as_echo "$ac_cv_lib_mpichf90_MPI_Init" >&6; }
4619 + if test "x$ac_cv_lib_mpichf90_MPI_Init" = x""yes; then :
4620 +  MPILIBS="-lmpichf90"
4621 + fi
4622  
4623 < ac_cv_f90libs=
4623 >        fi
4624  
4625 < # Save positional arguments (if any)
4626 < ac_save_positional="$@"
4627 <
4628 < set X $ac_f90_v_output
4629 < while test $# != 1; do
3645 <  shift
3646 <  ac_arg=$1
3647 <  case $ac_arg in
3648 <        [\\/]*.a | ?:[\\/]*.a)
3649 <            ac_exists=false
3650 <  for ac_i in $ac_cv_f90libs; do
3651 <    if test x"$ac_arg" = x"$ac_i"; then
3652 <      ac_exists=true
3653 <      break
3654 <    fi
3655 <  done
3656 <
3657 <  if test x"$ac_exists" = xtrue; then
3658 <  :
4625 > if test x = x"$MPILIBS"; then
4626 >        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5
4627 > $as_echo_n "checking for MPI_Init in -lmpi... " >&6; }
4628 > if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then :
4629 >  $as_echo_n "(cached) " >&6
4630   else
4631 <  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
4631 >  ac_check_lib_save_LIBS=$LIBS
4632 > LIBS="-lmpi  $LIBS"
4633 > cat > conftest.$ac_ext <<_ACEOF
4634 >      program main
4635 >      call MPI_Init
4636 >      end
4637 > _ACEOF
4638 > if ac_fn_fc_try_link "$LINENO"; then :
4639 >  ac_cv_lib_mpi_MPI_Init=yes
4640 > else
4641 >  ac_cv_lib_mpi_MPI_Init=no
4642   fi
4643 + rm -f core conftest.err conftest.$ac_objext \
4644 +    conftest$ac_exeext conftest.$ac_ext
4645 + LIBS=$ac_check_lib_save_LIBS
4646 + fi
4647 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5
4648 + $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; }
4649 + if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then :
4650 +  MPILIBS="-lmpi"
4651 + fi
4652  
4653 <          ;;
4654 <        -bI:*)
4655 <            ac_exists=false
4656 <  for ac_i in $ac_cv_f90libs; do
4657 <    if test x"$ac_arg" = x"$ac_i"; then
4658 <      ac_exists=true
3669 <      break
3670 <    fi
3671 <  done
3672 <
3673 <  if test x"$ac_exists" = xtrue; then
3674 <  :
4653 > fi
4654 > if test x = x"$MPILIBS"; then
4655 >        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5
4656 > $as_echo_n "checking for MPI_Init in -lmpich... " >&6; }
4657 > if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then :
4658 >  $as_echo_n "(cached) " >&6
4659   else
4660 <  if test "$ac_compiler_gnu" = yes; then
4661 <  for ac_link_opt in $ac_arg; do
4662 <    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
4663 <  done
4660 >  ac_check_lib_save_LIBS=$LIBS
4661 > LIBS="-lmpich  $LIBS"
4662 > cat > conftest.$ac_ext <<_ACEOF
4663 >      program main
4664 >      call MPI_Init
4665 >      end
4666 > _ACEOF
4667 > if ac_fn_fc_try_link "$LINENO"; then :
4668 >  ac_cv_lib_mpich_MPI_Init=yes
4669   else
4670 <  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
4670 >  ac_cv_lib_mpich_MPI_Init=no
4671   fi
4672 + rm -f core conftest.err conftest.$ac_objext \
4673 +    conftest$ac_exeext conftest.$ac_ext
4674 + LIBS=$ac_check_lib_save_LIBS
4675   fi
4676 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5
4677 + $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; }
4678 + if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then :
4679 +  MPILIBS="-lmpich"
4680 + fi
4681  
4682 <          ;;
3686 <          # Ignore these flags.
3687 <        -lang* | -lcrt[012].o | -lc | -lgcc | -LANG:=*)
3688 <          ;;
3689 <        -lkernel32)
3690 <          test x"$CYGWIN" != xyes && ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
3691 <          ;;
3692 <        -[LRuY])
3693 <          # These flags, when seen by themselves, take an argument.
3694 <          # We remove the space between option and argument and re-iterate
3695 <          # unless we find an empty arg or a new option (starting with -)
3696 <          case $2 in
3697 <             "" | -*);;
3698 <             *)
3699 <                ac_arg="$ac_arg$2"
4682 > fi
4683  
4684 <                shift; shift
4685 <                set X $ac_arg "$@"
4686 <                ;;
4687 <          esac
4688 <          ;;
4689 <        -YP,*)
4690 <          for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
4691 <              ac_exists=false
4692 <  for ac_i in $ac_cv_f90libs; do
4693 <    if test x"$ac_j" = x"$ac_i"; then
4694 <      ac_exists=true
3712 <      break
3713 <    fi
3714 <  done
3715 <
3716 <  if test x"$ac_exists" = xtrue; then
3717 <  :
4684 > if test x != x"$MPILIBS"; then
4685 >        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpif.h" >&5
4686 > $as_echo_n "checking for mpif.h... " >&6; }
4687 >        cat > conftest.$ac_ext <<_ACEOF
4688 >      program main
4689 >      include 'mpif.h'
4690 >      end
4691 > _ACEOF
4692 > if ac_fn_fc_try_compile "$LINENO"; then :
4693 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4694 > $as_echo "yes" >&6; }
4695   else
4696 <  ac_arg="$ac_arg $ac_j"
4697 <                             ac_cv_f90libs="$ac_cv_f90libs $ac_j"
4696 >  MPILIBS=""
4697 >                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4698 > $as_echo "no" >&6; }
4699   fi
4700 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4701 + fi
4702  
4703 <          done
3724 <          ;;
3725 <        -[lLR]*)
3726 <            ac_exists=false
3727 <  for ac_i in $ac_cv_f90libs; do
3728 <    if test x"$ac_arg" = x"$ac_i"; then
3729 <      ac_exists=true
3730 <      break
3731 <    fi
3732 <  done
4703 > FC="$ax_mpi_save_FC"
4704  
4705 <  if test x"$ac_exists" = xtrue; then
4706 <  :
4705 >
4706 >
4707 > # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
4708 > if test x = x"$MPILIBS"; then
4709 >        USE_MPI="no"
4710 >       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No suitable Fortran MPI implementation found. openmd_MPI will not be built." >&5
4711 > $as_echo "$as_me: WARNING: No suitable Fortran MPI implementation found. openmd_MPI will not be built." >&2;}
4712 >        :
4713   else
4714 <  ac_cv_f90libs="$ac_cv_f90libs $ac_arg"
4714 >        USE_MPI="yes"
4715 >        :
4716   fi
4717  
4718 <          ;;
4719 <          # Ignore everything else.
4720 <  esac
4718 >
4719 > fi
4720 > if test $USE_MPI != no; then :
4721 >
4722 >        CXX=$MPICXX
4723 >        CC=$MPICC
4724 >        FC=$MPIFC
4725 >        LIBS="$MPILIBS $LIBS"
4726 >
4727 > else
4728 >
4729 >        CXX=$save_CXX
4730 >        CC=$save_CC
4731 >        FC=$save_FC
4732 >        LIBS=$save_LIBS
4733 >
4734 >
4735 > fi
4736 >
4737 >
4738 > # Checks for programs.
4739 > ac_ext=c
4740 > ac_cpp='$CPP $CPPFLAGS'
4741 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4742 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4743 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
4744 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4745 > $as_echo_n "checking how to run the C preprocessor... " >&6; }
4746 > # On Suns, sometimes $CPP names a directory.
4747 > if test -n "$CPP" && test -d "$CPP"; then
4748 >  CPP=
4749 > fi
4750 > if test -z "$CPP"; then
4751 >  if test "${ac_cv_prog_CPP+set}" = set; then :
4752 >  $as_echo_n "(cached) " >&6
4753 > else
4754 >      # Double quotes because CPP needs to be expanded
4755 >    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4756 >    do
4757 >      ac_preproc_ok=false
4758 > for ac_c_preproc_warn_flag in '' yes
4759 > do
4760 >  # Use a header file that comes with gcc, so configuring glibc
4761 >  # with a fresh cross-compiler works.
4762 >  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4763 >  # <limits.h> exists even on freestanding compilers.
4764 >  # On the NeXT, cc -E runs the code through the compiler's parser,
4765 >  # not just through cpp. "Syntax error" is here to catch this case.
4766 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4767 > /* end confdefs.h.  */
4768 > #ifdef __STDC__
4769 > # include <limits.h>
4770 > #else
4771 > # include <assert.h>
4772 > #endif
4773 >                     Syntax error
4774 > _ACEOF
4775 > if ac_fn_c_try_cpp "$LINENO"; then :
4776 >
4777 > else
4778 >  # Broken: fails on valid input.
4779 > continue
4780 > fi
4781 > rm -f conftest.err conftest.$ac_ext
4782 >
4783 >  # OK, works on sane cases.  Now check whether nonexistent headers
4784 >  # can be detected and how.
4785 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4786 > /* end confdefs.h.  */
4787 > #include <ac_nonexistent.h>
4788 > _ACEOF
4789 > if ac_fn_c_try_cpp "$LINENO"; then :
4790 >  # Broken: success on invalid input.
4791 > continue
4792 > else
4793 >  # Passes both tests.
4794 > ac_preproc_ok=:
4795 > break
4796 > fi
4797 > rm -f conftest.err conftest.$ac_ext
4798 >
4799   done
4800 < # restore positional arguments
4801 < set X $ac_save_positional; shift
4800 > # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4801 > rm -f conftest.err conftest.$ac_ext
4802 > if $ac_preproc_ok; then :
4803 >  break
4804 > fi
4805  
4806 < # We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
4807 < # then we insist that the "run path" must be an absolute path (i.e. it
3749 < # must begin with a "/").
3750 < case `(uname -sr) 2>/dev/null` in
3751 <   "SunOS 5"*)
3752 <      ac_ld_run_path=`echo $ac_f90_v_output |
3753 <                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
3754 <      test "x$ac_ld_run_path" != x &&
4806 >    done
4807 >    ac_cv_prog_CPP=$CPP
4808  
4809 <        if test "$ac_compiler_gnu" = yes; then
4810 <  for ac_link_opt in $ac_ld_run_path; do
3758 <    ac_cv_f90libs="$ac_cv_f90libs -Xlinker $ac_link_opt"
3759 <  done
4809 > fi
4810 >  CPP=$ac_cv_prog_CPP
4811   else
4812 <  ac_cv_f90libs="$ac_cv_f90libs $ac_ld_run_path"
4812 >  ac_cv_prog_CPP=$CPP
4813   fi
4814 <      ;;
4814 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4815 > $as_echo "$CPP" >&6; }
4816 > ac_preproc_ok=false
4817 > for ac_c_preproc_warn_flag in '' yes
4818 > do
4819 >  # Use a header file that comes with gcc, so configuring glibc
4820 >  # with a fresh cross-compiler works.
4821 >  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4822 >  # <limits.h> exists even on freestanding compilers.
4823 >  # On the NeXT, cc -E runs the code through the compiler's parser,
4824 >  # not just through cpp. "Syntax error" is here to catch this case.
4825 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4826 > /* end confdefs.h.  */
4827 > #ifdef __STDC__
4828 > # include <limits.h>
4829 > #else
4830 > # include <assert.h>
4831 > #endif
4832 >                     Syntax error
4833 > _ACEOF
4834 > if ac_fn_c_try_cpp "$LINENO"; then :
4835 >
4836 > else
4837 >  # Broken: fails on valid input.
4838 > continue
4839 > fi
4840 > rm -f conftest.err conftest.$ac_ext
4841 >
4842 >  # OK, works on sane cases.  Now check whether nonexistent headers
4843 >  # can be detected and how.
4844 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4845 > /* end confdefs.h.  */
4846 > #include <ac_nonexistent.h>
4847 > _ACEOF
4848 > if ac_fn_c_try_cpp "$LINENO"; then :
4849 >  # Broken: success on invalid input.
4850 > continue
4851 > else
4852 >  # Passes both tests.
4853 > ac_preproc_ok=:
4854 > break
4855 > fi
4856 > rm -f conftest.err conftest.$ac_ext
4857 >
4858 > done
4859 > # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4860 > rm -f conftest.err conftest.$ac_ext
4861 > if $ac_preproc_ok; then :
4862 >
4863 > else
4864 >  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4865 > $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4866 > as_fn_error "C preprocessor \"$CPP\" fails sanity check
4867 > See \`config.log' for more details." "$LINENO" 5; }
4868 > fi
4869 >
4870 > ac_ext=${ac_fc_srcext-f}
4871 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
4872 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
4873 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
4874 >
4875 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4876 > $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4877 > if test "${ac_cv_path_GREP+set}" = set; then :
4878 >  $as_echo_n "(cached) " >&6
4879 > else
4880 >  if test -z "$GREP"; then
4881 >  ac_path_GREP_found=false
4882 >  # Loop through the user's path and test for each of PROGNAME-LIST
4883 >  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4884 > for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4885 > do
4886 >  IFS=$as_save_IFS
4887 >  test -z "$as_dir" && as_dir=.
4888 >    for ac_prog in grep ggrep; do
4889 >    for ac_exec_ext in '' $ac_executable_extensions; do
4890 >      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4891 >      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4892 > # Check for GNU ac_path_GREP and select it if it is found.
4893 >  # Check for GNU $ac_path_GREP
4894 > case `"$ac_path_GREP" --version 2>&1` in
4895 > *GNU*)
4896 >  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4897 > *)
4898 >  ac_count=0
4899 >  $as_echo_n 0123456789 >"conftest.in"
4900 >  while :
4901 >  do
4902 >    cat "conftest.in" "conftest.in" >"conftest.tmp"
4903 >    mv "conftest.tmp" "conftest.in"
4904 >    cp "conftest.in" "conftest.nl"
4905 >    $as_echo 'GREP' >> "conftest.nl"
4906 >    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4907 >    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4908 >    as_fn_arith $ac_count + 1 && ac_count=$as_val
4909 >    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4910 >      # Best one so far, save it but keep looking for a better one
4911 >      ac_cv_path_GREP="$ac_path_GREP"
4912 >      ac_path_GREP_max=$ac_count
4913 >    fi
4914 >    # 10*(2^10) chars as input seems more than enough
4915 >    test $ac_count -gt 10 && break
4916 >  done
4917 >  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4918   esac
3765 fi # test "x$F90LIBS" = "x"
4919  
4920 +      $ac_path_GREP_found && break 3
4921 +    done
4922 +  done
4923 +  done
4924 + IFS=$as_save_IFS
4925 +  if test -z "$ac_cv_path_GREP"; then
4926 +    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4927 +  fi
4928 + else
4929 +  ac_cv_path_GREP=$GREP
4930   fi
3768 echo "$as_me:$LINENO: result: $ac_cv_flibs" >&5
3769 echo "${ECHO_T}$ac_cv_flibs" >&6
3770 F90LIBS="$ac_cv_f90libs"
4931  
4932 < ac_ext=f90
4933 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4934 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4935 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4932 > fi
4933 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4934 > $as_echo "$ac_cv_path_GREP" >&6; }
4935 > GREP="$ac_cv_path_GREP"
4936  
4937  
4938 < echo "$as_me:$LINENO: checking for Fortran 90 name-mangling scheme" >&5
4939 < echo $ECHO_N "checking for Fortran 90 name-mangling scheme... $ECHO_C" >&6
4940 < if test "${ac_cv_f90_mangling+set}" = set; then
4941 <  echo $ECHO_N "(cached) $ECHO_C" >&6
4938 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4939 > $as_echo_n "checking for egrep... " >&6; }
4940 > if test "${ac_cv_path_EGREP+set}" = set; then :
4941 >  $as_echo_n "(cached) " >&6
4942   else
4943 <  ac_ext=f90
4944 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4945 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4946 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4947 < cat >conftest.$ac_ext <<_ACEOF
4948 < subroutine foobar()
4949 < return
4950 < end
4951 < subroutine foo_bar()
4952 < return
4953 < end
4954 < _ACEOF
4955 < rm -f conftest.$ac_objext
4956 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4957 <  (eval $ac_compile) 2>conftest.er1
4958 <  ac_status=$?
4959 <  grep -v '^ *+' conftest.er1 >conftest.err
4960 <  rm -f conftest.er1
4961 <  cat conftest.err >&5
4962 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4963 <  (exit $ac_status); } &&
4964 <         { ac_try='test -z "$ac_f90_werror_flag"
4965 <                         || test ! -s conftest.err'
4966 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4967 <  (eval $ac_try) 2>&5
4968 <  ac_status=$?
4969 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4970 <  (exit $ac_status); }; } &&
4971 <         { ac_try='test -s conftest.$ac_objext'
4972 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4973 <  (eval $ac_try) 2>&5
4974 <  ac_status=$?
4975 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4976 <  (exit $ac_status); }; }; then
4977 <  mv conftest.$ac_objext cf90_test.$ac_objext
4943 >  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4944 >   then ac_cv_path_EGREP="$GREP -E"
4945 >   else
4946 >     if test -z "$EGREP"; then
4947 >  ac_path_EGREP_found=false
4948 >  # Loop through the user's path and test for each of PROGNAME-LIST
4949 >  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4950 > for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4951 > do
4952 >  IFS=$as_save_IFS
4953 >  test -z "$as_dir" && as_dir=.
4954 >    for ac_prog in egrep; do
4955 >    for ac_exec_ext in '' $ac_executable_extensions; do
4956 >      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4957 >      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4958 > # Check for GNU ac_path_EGREP and select it if it is found.
4959 >  # Check for GNU $ac_path_EGREP
4960 > case `"$ac_path_EGREP" --version 2>&1` in
4961 > *GNU*)
4962 >  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4963 > *)
4964 >  ac_count=0
4965 >  $as_echo_n 0123456789 >"conftest.in"
4966 >  while :
4967 >  do
4968 >    cat "conftest.in" "conftest.in" >"conftest.tmp"
4969 >    mv "conftest.tmp" "conftest.in"
4970 >    cp "conftest.in" "conftest.nl"
4971 >    $as_echo 'EGREP' >> "conftest.nl"
4972 >    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4973 >    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4974 >    as_fn_arith $ac_count + 1 && ac_count=$as_val
4975 >    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4976 >      # Best one so far, save it but keep looking for a better one
4977 >      ac_cv_path_EGREP="$ac_path_EGREP"
4978 >      ac_path_EGREP_max=$ac_count
4979 >    fi
4980 >    # 10*(2^10) chars as input seems more than enough
4981 >    test $ac_count -gt 10 && break
4982 >  done
4983 >  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4984 > esac
4985  
4986 <  ac_ext=c
4987 < ac_cpp='$CPP $CPPFLAGS'
4988 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4989 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4990 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
4986 >      $ac_path_EGREP_found && break 3
4987 >    done
4988 >  done
4989 >  done
4990 > IFS=$as_save_IFS
4991 >  if test -z "$ac_cv_path_EGREP"; then
4992 >    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4993 >  fi
4994 > else
4995 >  ac_cv_path_EGREP=$EGREP
4996 > fi
4997  
4998 <  ac_save_LIBS=$LIBS
4999 <  LIBS="cf90_test.$ac_objext $F90LIBS $LIBS"
4998 >   fi
4999 > fi
5000 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5001 > $as_echo "$ac_cv_path_EGREP" >&6; }
5002 > EGREP="$ac_cv_path_EGREP"
5003  
3828  ac_success=no
3829  for ac_foobar in foobar FOOBAR; do
3830    for ac_underscore in "" "_"; do
3831      ac_func="$ac_foobar$ac_underscore"
3832      cat >conftest.$ac_ext <<_ACEOF
3833 /* confdefs.h.  */
3834 _ACEOF
3835 cat confdefs.h >>conftest.$ac_ext
3836 cat >>conftest.$ac_ext <<_ACEOF
3837 /* end confdefs.h.  */
5004  
5005 < /* Override any gcc2 internal prototype to avoid an error.  */
5006 < #ifdef __cplusplus
5007 < extern "C"
5008 < #endif
5009 < /* We use char because int might match the return type of a gcc2
5010 <   builtin and then its argument prototype would still apply.  */
3845 < char $ac_func ();
3846 < int
3847 < main ()
3848 < {
3849 < $ac_func ();
3850 <  ;
3851 <  return 0;
3852 < }
3853 < _ACEOF
3854 < rm -f conftest.$ac_objext conftest$ac_exeext
3855 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3856 <  (eval $ac_link) 2>conftest.er1
3857 <  ac_status=$?
3858 <  grep -v '^ *+' conftest.er1 >conftest.err
3859 <  rm -f conftest.er1
3860 <  cat conftest.err >&5
3861 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3862 <  (exit $ac_status); } &&
3863 <         { ac_try='test -z "$ac_c_werror_flag"
3864 <                         || test ! -s conftest.err'
3865 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3866 <  (eval $ac_try) 2>&5
3867 <  ac_status=$?
3868 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3869 <  (exit $ac_status); }; } &&
3870 <         { ac_try='test -s conftest$ac_exeext'
3871 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3872 <  (eval $ac_try) 2>&5
3873 <  ac_status=$?
3874 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3875 <  (exit $ac_status); }; }; then
3876 <  ac_success=yes; break 2
5005 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5006 > $as_echo_n "checking whether ln -s works... " >&6; }
5007 > LN_S=$as_ln_s
5008 > if test "$LN_S" = "ln -s"; then
5009 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5010 > $as_echo "yes" >&6; }
5011   else
5012 <  echo "$as_me: failed program was:" >&5
5013 < sed 's/^/| /' conftest.$ac_ext >&5
5012 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5013 > $as_echo "no, using $LN_S" >&6; }
5014 > fi
5015  
5016 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5017 + $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5018 + set x ${MAKE-make}
5019 + ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5020 + if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5021 +  $as_echo_n "(cached) " >&6
5022 + else
5023 +  cat >conftest.make <<\_ACEOF
5024 + SHELL = /bin/sh
5025 + all:
5026 +        @echo '@@@%%%=$(MAKE)=@@@%%%'
5027 + _ACEOF
5028 + # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5029 + case `${MAKE-make} -f conftest.make 2>/dev/null` in
5030 +  *@@@%%%=?*=@@@%%%*)
5031 +    eval ac_cv_prog_make_${ac_make}_set=yes;;
5032 +  *)
5033 +    eval ac_cv_prog_make_${ac_make}_set=no;;
5034 + esac
5035 + rm -f conftest.make
5036   fi
5037 < rm -f conftest.err conftest.$ac_objext \
5038 <      conftest$ac_exeext conftest.$ac_ext
5039 <    done
5037 > if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5038 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5039 > $as_echo "yes" >&6; }
5040 >  SET_MAKE=
5041 > else
5042 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043 > $as_echo "no" >&6; }
5044 >  SET_MAKE="MAKE=${MAKE-make}"
5045 > fi
5046 >
5047 > if test -n "$ac_tool_prefix"; then
5048 >  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5049 > set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5050 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5051 > $as_echo_n "checking for $ac_word... " >&6; }
5052 > if test "${ac_cv_prog_RANLIB+set}" = set; then :
5053 >  $as_echo_n "(cached) " >&6
5054 > else
5055 >  if test -n "$RANLIB"; then
5056 >  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5057 > else
5058 > as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5059 > for as_dir in $PATH
5060 > do
5061 >  IFS=$as_save_IFS
5062 >  test -z "$as_dir" && as_dir=.
5063 >    for ac_exec_ext in '' $ac_executable_extensions; do
5064 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5065 >    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5066 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5067 >    break 2
5068 >  fi
5069 > done
5070    done
5071 + IFS=$as_save_IFS
5072  
5073 <  if test "$ac_success" = "yes"; then
5074 <     case $ac_foobar in
5075 <        foobar)
5076 <           ac_case=lower
5077 <           ac_foo_bar=foo_bar
5078 <           ;;
5079 <        FOOBAR)
5080 <           ac_case=upper
5081 <           ac_foo_bar=FOO_BAR
5082 <           ;;
3897 <     esac
5073 > fi
5074 > fi
5075 > RANLIB=$ac_cv_prog_RANLIB
5076 > if test -n "$RANLIB"; then
5077 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5078 > $as_echo "$RANLIB" >&6; }
5079 > else
5080 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5081 > $as_echo "no" >&6; }
5082 > fi
5083  
3899     ac_success_extra=no
3900     for ac_extra in "" "_"; do
3901        ac_func="$ac_foo_bar$ac_underscore$ac_extra"
5084  
5085 <        cat >conftest.$ac_ext <<_ACEOF
5086 < /* confdefs.h.  */
5087 < _ACEOF
5088 < cat confdefs.h >>conftest.$ac_ext
5089 < cat >>conftest.$ac_ext <<_ACEOF
5090 < /* end confdefs.h.  */
5085 > fi
5086 > if test -z "$ac_cv_prog_RANLIB"; then
5087 >  ac_ct_RANLIB=$RANLIB
5088 >  # Extract the first word of "ranlib", so it can be a program name with args.
5089 > set dummy ranlib; ac_word=$2
5090 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5091 > $as_echo_n "checking for $ac_word... " >&6; }
5092 > if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5093 >  $as_echo_n "(cached) " >&6
5094 > else
5095 >  if test -n "$ac_ct_RANLIB"; then
5096 >  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5097 > else
5098 > as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099 > for as_dir in $PATH
5100 > do
5101 >  IFS=$as_save_IFS
5102 >  test -z "$as_dir" && as_dir=.
5103 >    for ac_exec_ext in '' $ac_executable_extensions; do
5104 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5105 >    ac_cv_prog_ac_ct_RANLIB="ranlib"
5106 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107 >    break 2
5108 >  fi
5109 > done
5110 >  done
5111 > IFS=$as_save_IFS
5112  
5113 < /* Override any gcc2 internal prototype to avoid an error.  */
5114 < #ifdef __cplusplus
5115 < extern "C"
5116 < #endif
5117 < /* We use char because int might match the return type of a gcc2
5118 <   builtin and then its argument prototype would still apply.  */
3916 < char $ac_func ();
3917 < int
3918 < main ()
3919 < {
3920 < $ac_func ();
3921 <  ;
3922 <  return 0;
3923 < }
3924 < _ACEOF
3925 < rm -f conftest.$ac_objext conftest$ac_exeext
3926 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3927 <  (eval $ac_link) 2>conftest.er1
3928 <  ac_status=$?
3929 <  grep -v '^ *+' conftest.er1 >conftest.err
3930 <  rm -f conftest.er1
3931 <  cat conftest.err >&5
3932 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3933 <  (exit $ac_status); } &&
3934 <         { ac_try='test -z "$ac_c_werror_flag"
3935 <                         || test ! -s conftest.err'
3936 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3937 <  (eval $ac_try) 2>&5
3938 <  ac_status=$?
3939 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3940 <  (exit $ac_status); }; } &&
3941 <         { ac_try='test -s conftest$ac_exeext'
3942 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3943 <  (eval $ac_try) 2>&5
3944 <  ac_status=$?
3945 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 <  (exit $ac_status); }; }; then
3947 <  ac_success_extra=yes; break
5113 > fi
5114 > fi
5115 > ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5116 > if test -n "$ac_ct_RANLIB"; then
5117 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5118 > $as_echo "$ac_ct_RANLIB" >&6; }
5119   else
5120 <  echo "$as_me: failed program was:" >&5
5121 < sed 's/^/| /' conftest.$ac_ext >&5
3951 <
5120 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121 > $as_echo "no" >&6; }
5122   fi
3953 rm -f conftest.err conftest.$ac_objext \
3954      conftest$ac_exeext conftest.$ac_ext
3955     done
5123  
5124 <     if test "$ac_success_extra" = "yes"; then
5125 <        ac_cv_f90_mangling="$ac_case case"
3959 <        if test -z "$ac_underscore"; then
3960 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, no underscore"
3961 <        else
3962 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, underscore"
3963 <
3964 <        fi
3965 <        if test -z "$ac_extra"; then
3966 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, no extra underscore"
3967 <        else
3968 <           ac_cv_f90_mangling="$ac_cv_f90_mangling, extra underscore"
3969 <        fi
3970 <      else
3971 <        ac_cv_f90_mangling="unknown"
3972 <      fi
5124 >  if test "x$ac_ct_RANLIB" = x; then
5125 >    RANLIB=":"
5126    else
5127 <     ac_cv_f90_mangling="unknown"
5128 <
5127 >    case $cross_compiling:$ac_tool_warned in
5128 > yes:)
5129 > { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5130 > $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5131 > ac_tool_warned=yes ;;
5132 > esac
5133 >    RANLIB=$ac_ct_RANLIB
5134    fi
5135 + else
5136 +  RANLIB="$ac_cv_prog_RANLIB"
5137 + fi
5138  
5139 <  LIBS=$ac_save_LIBS
5140 <  ac_ext=f90
5141 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5142 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5143 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5144 <  rm -f cf90_test* conftest*
5139 >
5140 >   # Extract the first word of "perl", so it can be a program name with args.
5141 > set dummy perl; ac_word=$2
5142 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5143 > $as_echo_n "checking for $ac_word... " >&6; }
5144 > if test "${ac_cv_path_PERLINTERP+set}" = set; then :
5145 >  $as_echo_n "(cached) " >&6
5146   else
5147 <  echo "$as_me: failed program was:" >&5
5148 < sed 's/^/| /' conftest.$ac_ext >&5
5147 >  case $PERLINTERP in
5148 >  [\\/]* | ?:[\\/]*)
5149 >  ac_cv_path_PERLINTERP="$PERLINTERP" # Let the user override the test with a path.
5150 >  ;;
5151 >  *)
5152 >  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5153 > for as_dir in $PATH
5154 > do
5155 >  IFS=$as_save_IFS
5156 >  test -z "$as_dir" && as_dir=.
5157 >    for ac_exec_ext in '' $ac_executable_extensions; do
5158 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5159 >    ac_cv_path_PERLINTERP="$as_dir/$ac_word$ac_exec_ext"
5160 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5161 >    break 2
5162 >  fi
5163 > done
5164 >  done
5165 > IFS=$as_save_IFS
5166  
5167 +  test -z "$ac_cv_path_PERLINTERP" && ac_cv_path_PERLINTERP="perl"
5168 +  ;;
5169 + esac
5170   fi
5171 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5172 < ac_ext=f90
5173 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
5174 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5175 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
5176 <
5171 > PERLINTERP=$ac_cv_path_PERLINTERP
5172 > if test -n "$PERLINTERP"; then
5173 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLINTERP" >&5
5174 > $as_echo "$PERLINTERP" >&6; }
5175 > else
5176 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177 > $as_echo "no" >&6; }
5178   fi
3996 echo "$as_me:$LINENO: result: $ac_cv_f90_mangling" >&5
3997 echo "${ECHO_T}$ac_cv_f90_mangling" >&6
5179  
5180  
5181 +   ac_cv_path_perlinterp="$PERLINTERP"
5182 +   _sHpB='#!'
5183  
4001 case $ac_cv_f90_mangling in
4002  "lower case, no underscore, no extra underscore")
4003          cat >>confdefs.h <<\_ACEOF
4004 #define F90_FUNC(name,NAME) name
4005 _ACEOF
5184  
5185 <          cat >>confdefs.h <<\_ACEOF
5186 < #define F90_FUNC_(name,NAME) name
5187 < _ACEOF
5188 < ;;
5189 <  "lower case, no underscore, extra underscore")
5190 <          cat >>confdefs.h <<\_ACEOF
4013 < #define F90_FUNC(name,NAME) name
4014 < _ACEOF
5185 > # Check whether --with-perl-shebang was given.
5186 > if test "${with_perl_shebang+set}" = set; then :
5187 >  withval=$with_perl_shebang; opt_perl_shebang="$withval"
5188 > else
5189 >                opt_perl_shebang="not_set"
5190 > fi
5191  
5192 <          cat >>confdefs.h <<\_ACEOF
5193 < #define F90_FUNC_(name,NAME) name ## _
5194 < _ACEOF
5195 < ;;
5196 <  "lower case, underscore, no extra underscore")
5197 <          cat >>confdefs.h <<\_ACEOF
5198 < #define F90_FUNC(name,NAME) name ## _
5199 < _ACEOF
5192 >   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether explicit instead of detected sharpbang is to be used" >&5
5193 > $as_echo_n "checking whether explicit instead of detected sharpbang is to be used... " >&6; }
5194 > if test "${ax_cv_opt_perl_shebang+set}" = set; then :
5195 >  $as_echo_n "(cached) " >&6
5196 > else
5197 >   case "$opt_perl_shebang" in
5198 >                      not_set  ) ax_cv_opt_perl_shebang=''
5199 >                               ;;
5200 >                         *     )
5201 >        ax_cv_opt_perl_shebang=`echo "$opt_perl_shebang" | sed -e's|^#!\s*\(.*\)$|\1|'`
5202 >                    esac
5203  
5204 <          cat >>confdefs.h <<\_ACEOF
5205 < #define F90_FUNC_(name,NAME) name ## _
5206 < _ACEOF
5207 < ;;
5208 <  "lower case, underscore, extra underscore")
5209 <          cat >>confdefs.h <<\_ACEOF
5210 < #define F90_FUNC(name,NAME) name ## _
5211 < _ACEOF
5204 > fi
5205 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_opt_perl_shebang" >&5
5206 > $as_echo "$ax_cv_opt_perl_shebang" >&6; }
5207 >   if test "A$ax_cv_opt_perl_shebang" != "A"
5208 >     then
5209 >       ac_cv_sys_kernshrpbang_perl="$ax_cv_opt_perl_shebang"
5210 >       PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl"
5211 >              { $as_echo "$as_me:${as_lineno-$LINENO}: OK - PERL_SHEBANG is $_sHpB$PERL_SHEBANG." >&5
5212 > $as_echo "$as_me: OK - PERL_SHEBANG is $_sHpB$PERL_SHEBANG." >&6;}
5213  
5214 <          cat >>confdefs.h <<\_ACEOF
5215 < #define F90_FUNC_(name,NAME) name ## __
5216 < _ACEOF
5217 < ;;
5218 <  "upper case, no underscore, no extra underscore")
5219 <          cat >>confdefs.h <<\_ACEOF
5220 < #define F90_FUNC(name,NAME) NAME
5221 < _ACEOF
5222 <
5223 <          cat >>confdefs.h <<\_ACEOF
5224 < #define F90_FUNC_(name,NAME) NAME
5225 < _ACEOF
5226 < ;;
5227 <  "upper case, no underscore, extra underscore")
5228 <          cat >>confdefs.h <<\_ACEOF
5229 < #define F90_FUNC(name,NAME) NAME
5230 < _ACEOF
5231 <
5232 <          cat >>confdefs.h <<\_ACEOF
5233 < #define F90_FUNC_(name,NAME) NAME ## _
5234 < _ACEOF
4055 < ;;
4056 <  "upper case, underscore, no extra underscore")
4057 <          cat >>confdefs.h <<\_ACEOF
4058 < #define F90_FUNC(name,NAME) NAME ## _
4059 < _ACEOF
4060 <
4061 <          cat >>confdefs.h <<\_ACEOF
4062 < #define F90_FUNC_(name,NAME) NAME ## _
4063 < _ACEOF
4064 < ;;
4065 <  "upper case, underscore, extra underscore")
4066 <          cat >>confdefs.h <<\_ACEOF
4067 < #define F90_FUNC(name,NAME) NAME ## _
4068 < _ACEOF
4069 <
4070 <          cat >>confdefs.h <<\_ACEOF
4071 < #define F90_FUNC_(name,NAME) NAME ## __
4072 < _ACEOF
4073 < ;;
4074 <  *)
4075 <          { echo "$as_me:$LINENO: WARNING: unknown Fortran 90 name-mangling scheme" >&5
4076 < echo "$as_me: WARNING: unknown Fortran 90 name-mangling scheme" >&2;}
4077 <          ;;
4078 < esac
4079 <
4080 <
4081 <
4082 <
5214 > # Automatic detection of sharpbang formula starts here
5215 >     else
5216 >   _somian_shbangperl=`$PERLINTERP -V:startperl`
5217 >   negclass="[^']"; # must leave this comment:  m4 will remove the outer brackets for us, heheh
5218 >   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel sharpbang invocation to start perl" >&5
5219 > $as_echo_n "checking for kernel sharpbang invocation to start perl... " >&6; }
5220 > if test "${ac_cv_sys_kernshrpbang_perl+set}" = set; then :
5221 >  $as_echo_n "(cached) " >&6
5222 > else
5223 >  _somian_kspb_perl=`echo "$_somian_shbangperl" | sed -ne"s|.*='\($negclass*\)';$|\1|p"`
5224 >        if test "x$_somian_kspb_perl" == x
5225 >          then _somian_ksbp_warn_empty='durnit'
5226 >          else
5227 >          case "A$_somian_kspb_perl" in
5228 >                 A#!*perl* )
5229 >           ac_cv_sys_kernshrpbang_perl=`echo "$_somian_kspb_perl" | sed -e's|#!\(.*\)$|\1|'`
5230 >                        ;;
5231 >                     A*    )  _somian_ksbp_warn_defau='trouble'
5232 >                              ac_cv_sys_kernshrpbang_perl="$PERLINTERP"
5233 >          esac
5234 >        fi
5235  
5236 < echo "$as_me:$LINENO: checking for module suffix" >&5
5237 < echo $ECHO_N "checking for module suffix... $ECHO_C" >&6
5238 < rm -f conftest*
5239 < # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
5240 < rm -f work*
5241 < cat >conftest.f90 <<EOF
5242 <        module conftest
5243 <        integer n
5244 <        parameter (n=1)
4093 <        end module conftest
4094 < EOF
4095 < # SGI and absoft compilers generates module name in upper case!
4096 < testname="conftest"
4097 < modcase="lower"
4098 < if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
4099 <    MOD=`ls conftest* | grep -v conftest.f | grep -v conftest.o`
4100 <    MOD=`echo "$MOD" | sed -e 's/conftest\.//g'`
4101 <    if test -z "$MOD" ; then
4102 <        MOD=`ls CONFTEST* 2>/dev/null \
4103 <                | grep -v CONFTEST.f | grep -v CONFTEST.o`
4104 <        MOD=`echo "$MOD" | sed -e 's/CONFTEST\.//g'`
4105 <        if test -n "$MOD" ; then
4106 <            testname="CONFTEST"
4107 <            modcase="upper"
4108 <        fi
5236 > fi
5237 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_kernshrpbang_perl" >&5
5238 > $as_echo "$ac_cv_sys_kernshrpbang_perl" >&6; }
5239 > # The above prints Checking ... result message to user.
5240 >   PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl"
5241 >
5242 >    if test A${_somian_ksbp_warn_empty+set} == Aset
5243 >      then   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: In last check, doing $PERLINTERP -V:startperl yielded empty result! That should not happen." >&5
5244 > $as_echo "$as_me: WARNING: In last check, doing $PERLINTERP -V:startperl yielded empty result! That should not happen." >&2;}
5245      fi
5246 <    if test -z "$MOD" ; then
5247 <        echo "$as_me:$LINENO: result: unknown" >&5
5248 < echo "${ECHO_T}unknown" >&6
5249 <        # Use mod if we can't figure it out
5250 <        MOD="mod"
5251 <    else
5252 <        echo "$as_me:$LINENO: result: $MOD" >&5
5253 < echo "${ECHO_T}$MOD" >&6
5246 > # Inform user after printing result value
5247 >    if test A${_somian_ksbp_warn_defau+set} == Aset
5248 >      then { $as_echo "$as_me:${as_lineno-$LINENO}: Maybe Not good -" >&5
5249 > $as_echo "$as_me: Maybe Not good -" >&6;}
5250 >           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: In last check perl's Config query did not work so we bunted: $_sHpB$PERLINTERP" >&5
5251 > $as_echo "$as_me: WARNING: In last check perl's Config query did not work so we bunted: $_sHpB$PERLINTERP" >&2;}
5252 >      else { $as_echo "$as_me:${as_lineno-$LINENO}: OK Good result - " >&5
5253 > $as_echo "$as_me: OK Good result - " >&6;}
5254 >           { $as_echo "$as_me:${as_lineno-$LINENO}: In last check we got a proper-looking answer from perl's Config: $_somian_shbangperl" >&5
5255 > $as_echo "$as_me: In last check we got a proper-looking answer from perl's Config: $_somian_shbangperl" >&6;}
5256      fi
5257 <    if test -s work.pcl ; then
5258 <        { echo "$as_me:$LINENO: WARNING: Compiler generates auxillery files!" >&5
5259 < echo "$as_me: WARNING: Compiler generates auxillery files!" >&2;}
5260 <    fi
5257 >  fi
5258 >
5259 > # Find a good install program.  We prefer a C program (faster),
5260 > # so one script is as good as another.  But avoid the broken or
5261 > # incompatible versions:
5262 > # SysV /etc/install, /usr/sbin/install
5263 > # SunOS /usr/etc/install
5264 > # IRIX /sbin/install
5265 > # AIX /bin/install
5266 > # AmigaOS /C/install, which installs bootblocks on floppy discs
5267 > # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5268 > # AFS /usr/afsws/bin/install, which mishandles nonexistent args
5269 > # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5270 > # OS/2's system install, which has a completely different semantic
5271 > # ./install, which can be erroneously created by make from ./install.sh.
5272 > # Reject install programs that cannot install multiple files.
5273 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5274 > $as_echo_n "checking for a BSD-compatible install... " >&6; }
5275 > if test -z "$INSTALL"; then
5276 > if test "${ac_cv_path_install+set}" = set; then :
5277 >  $as_echo_n "(cached) " >&6
5278   else
5279 <    echo "$as_me:$LINENO: result: unknown" >&5
5280 < echo "${ECHO_T}unknown" >&6
5281 < fi
5279 >  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5280 > for as_dir in $PATH
5281 > do
5282 >  IFS=$as_save_IFS
5283 >  test -z "$as_dir" && as_dir=.
5284 >    # Account for people who put trailing slashes in PATH elements.
5285 > case $as_dir/ in #((
5286 >  ./ | .// | /[cC]/* | \
5287 >  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5288 >  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5289 >  /usr/ucb/* ) ;;
5290 >  *)
5291 >    # OSF1 and SCO ODT 3.0 have their own names for install.
5292 >    # Don't use installbsd from OSF since it installs stuff as root
5293 >    # by default.
5294 >    for ac_prog in ginstall scoinst install; do
5295 >      for ac_exec_ext in '' $ac_executable_extensions; do
5296 >        if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5297 >          if test $ac_prog = install &&
5298 >            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5299 >            # AIX install.  It has an incompatible calling convention.
5300 >            :
5301 >          elif test $ac_prog = install &&
5302 >            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5303 >            # program-specific install script used by HP pwplus--don't use.
5304 >            :
5305 >          else
5306 >            rm -rf conftest.one conftest.two conftest.dir
5307 >            echo one > conftest.one
5308 >            echo two > conftest.two
5309 >            mkdir conftest.dir
5310 >            if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5311 >              test -s conftest.one && test -s conftest.two &&
5312 >              test -s conftest.dir/conftest.one &&
5313 >              test -s conftest.dir/conftest.two
5314 >            then
5315 >              ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5316 >              break 3
5317 >            fi
5318 >          fi
5319 >        fi
5320 >      done
5321 >    done
5322 >    ;;
5323 > esac
5324  
5325 +  done
5326 + IFS=$as_save_IFS
5327  
5328 + rm -rf conftest.one conftest.two conftest.dir
5329  
5330 + fi
5331 +  if test "${ac_cv_path_install+set}" = set; then
5332 +    INSTALL=$ac_cv_path_install
5333 +  else
5334 +    # As a last resort, use the slow shell script.  Don't cache a
5335 +    # value for INSTALL within a source directory, because that will
5336 +    # break other packages using the cache if that directory is
5337 +    # removed, or if the value is a relative name.
5338 +    INSTALL=$ac_install_sh
5339 +  fi
5340 + fi
5341 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5342 + $as_echo "$INSTALL" >&6; }
5343  
5344 + # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5345 + # It thinks the first close brace ends the variable substitution.
5346 + test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5347  
5348 < # Check for module include path (some use -I, some (Solaris) use -M, some
4133 < # (absoft) use -p).
4134 < # Intel compilers use a wierd system: -cl,filename.pcl .  If no file is
4135 < # specified, work.pcl and work.pc are created.  However, if you specify
4136 < # a file, it must contain a the name of a file ending in .pc .  Ugh!
4137 < # Use the module made above
4138 < echo "$as_me:$LINENO: checking for module directory path flag" >&5
4139 < echo $ECHO_N "checking for module directory path flag... $ECHO_C" >&6
4140 < rm -f conftest*
4141 < # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
4142 < rm -f work*
4143 < cat >conftest.f90 <<EOF
4144 <        module conftest
4145 <        integer n
4146 <        parameter (n=1)
4147 <        end module conftest
4148 < EOF
4149 < # SGI and absoft compilers generates module name in upper case!
4150 < testname="conftest"
4151 < if $F90 -c conftest.f90 > conftest.out 2>&1 ; then
4152 <   mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.f | grep -v CONFTEST.o`
4153 <   mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'`
4154 <   if test -n "$mod" ; then
4155 <      testname="CONFTEST"
4156 <   fi
4157 <   madedir=0
4158 <   if test ! -d conf ; then mkdir conf ; madedir=1; fi
4159 <   cp $testname.$MOD conf
4160 <   rm -f conftest* CONFTEST*
4161 <   cat >conftest1.f90 <<EOF
4162 <        program main
4163 <        use conftest
4164 <        print *, n
4165 <        end
4166 < EOF
4167 <   F90_WORK_FILES_ARG=""
4168 <   F90MODINCSPEC=""
4169 <   if $F90 -c -Iconf conftest1.f90 > conftest.out 2>&1 ; then
4170 <       MODDIRFLAG="-I"
4171 <       F90MODINCSPEC="-I<dir>"
4172 <       echo "$as_me:$LINENO: result: -I" >&5
4173 < echo "${ECHO_T}-I" >&6
4174 <   elif $F90 -c -Mconf conftest1.f90 >> conftest.out 2>&1 ; then
4175 <       MODDIRFLAG="-M"
4176 <       F90MODINCSPEC="-M<dir>"
4177 <       echo "$as_me:$LINENO: result: -M" >&5
4178 < echo "${ECHO_T}-M" >&6
4179 <   elif $F90 -c -pconf conftest1.f90 >> conftest.out 2>&1 ; then
4180 <       MODDIRFLAG="-p"
4181 <       F90MODINCSPEC="-p<dir>"
4182 <       echo "$as_me:$LINENO: result: -p" >&5
4183 < echo "${ECHO_T}-p" >&6
4184 <   elif test -s work.pc ; then
4185 <        cp work.pc conf/mpimod.pc
4186 <        echo "mpimod.pc" > conf/mpimod.pcl
4187 <        echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl
4188 <        if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then
4189 <            MODDIRFLAG='-cl,mpimod.pcl'
4190 <            echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5
4191 < echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6
4192 <            F90_WORK_FILES_ARG="-cl,mpimod.pcl"
4193 <            F90MODINCSPEC="-cl,<dir>/<file>mod.pcl"
5348 > test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5349  
5350 <        else
4196 <            # The version of the Intel compiler that I have refuses to let
4197 <            # you put the "work catalog" list anywhere but the current
4198 <            # directory. For example, you cannot in
4199 <         :
4200 <        fi
4201 <   fi
4202 <   if test -z "MODDIRFLAG" ; then
4203 <       echo "$as_me:$LINENO: result: unknown" >&5
4204 < echo "${ECHO_T}unknown" >&6
4205 <   fi
5350 > test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5351  
5352 <
5353 <   rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod*
5354 <   if test $madedir = 1 ; then rmdir conf ; fi
5355 < fi
5356 <
5357 <
5358 < echo "$as_me:$LINENO: checking for Fortran 90 module file names" >&5
5359 < echo $ECHO_N "checking for Fortran 90 module file names... $ECHO_C" >&6
5360 < if test "${ac_cv_f90_module_names+set}" = set; then
5361 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5352 > case "x$INSTALL" in
5353 >   x/*) ;;
5354 >   *) INSTALL=`pwd`/ac-tools/"shtool install -c" ;
5355 > esac
5356 > MKINSTALLDIRS=`pwd`/ac-tools/"shtool mkdir -p -f -m 755"
5357 > # Extract the first word of "ar", so it can be a program name with args.
5358 > set dummy ar; ac_word=$2
5359 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5360 > $as_echo_n "checking for $ac_word... " >&6; }
5361 > if test "${ac_cv_prog_AR+set}" = set; then :
5362 >  $as_echo_n "(cached) " >&6
5363   else
5364 <  ac_ext=f90
5365 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4220 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4221 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4222 <
4223 < # carry out the test in a new directory, so that we don't miss anything
4224 < mkdir conftest
4225 < cd conftest
4226 < cat >conftest.$ac_ext <<_ACEOF
4227 < MODULE Bar
4228 < END MODULE Bar
4229 < _ACEOF
4230 < rm -f conftest.$ac_objext
4231 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4232 <  (eval $ac_compile) 2>conftest.er1
4233 <  ac_status=$?
4234 <  grep -v '^ *+' conftest.er1 >conftest.err
4235 <  rm -f conftest.er1
4236 <  cat conftest.err >&5
4237 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4238 <  (exit $ac_status); } &&
4239 <         { ac_try='test -z "$ac_f90_werror_flag"
4240 <                         || test ! -s conftest.err'
4241 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4242 <  (eval $ac_try) 2>&5
4243 <  ac_status=$?
4244 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4245 <  (exit $ac_status); }; } &&
4246 <         { ac_try='test -s conftest.$ac_objext'
4247 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4248 <  (eval $ac_try) 2>&5
4249 <  ac_status=$?
4250 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4251 <  (exit $ac_status); }; }; then
4252 <  ac_cv_f90_module_names=
4253 < ac_file_list=*
4254 < for ac_file in $ac_file_list; do
4255 <   case $ac_file in
4256 <      # don't care for original source and object files
4257 <      conftest.$ac_ext | conftest.$ac_objext | conftest.err )
4258 <          :
4259 <          ;;
4260 <      # look for new files derived from the file name
4261 <      *conftest*)
4262 <          ac_pat=`echo $ac_file | sed s/conftest/%FILE%/`
4263 <            ac_exists=false
4264 <  for ac_i in $ac_cv_f90_module_names; do
4265 <    if test x"$ac_pat" = x"$ac_i"; then
4266 <      ac_exists=true
4267 <      break
4268 <    fi
4269 <  done
4270 <
4271 <  if test x"$ac_exists" = xtrue; then
4272 <  :
5364 >  if test -n "$AR"; then
5365 >  ac_cv_prog_AR="$AR" # Let the user override the test.
5366   else
5367 <  ac_cv_f90_module_names="$ac_cv_f90_module_names $ac_pat"
5368 < fi
5369 <
5370 <          ;;
5371 <      # look for new files derived from the module name,
5372 <      # with different case translation schemes
5373 <      *Bar*)
5374 <          ac_pat=`echo $ac_file | sed s/Bar/%Module%/`
5375 <            ac_exists=false
5376 <  for ac_i in $ac_cv_f90_module_names; do
5377 <    if test x"$ac_pat" = x"$ac_i"; then
5378 <      ac_exists=true
4286 <      break
4287 <    fi
5367 > as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5368 > for as_dir in $PATH
5369 > do
5370 >  IFS=$as_save_IFS
5371 >  test -z "$as_dir" && as_dir=.
5372 >    for ac_exec_ext in '' $ac_executable_extensions; do
5373 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5374 >    ac_cv_prog_AR="ar"
5375 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5376 >    break 2
5377 >  fi
5378 > done
5379    done
5380 + IFS=$as_save_IFS
5381  
5382 <  if test x"$ac_exists" = xtrue; then
4291 <  :
4292 < else
4293 <  ac_cv_f90_module_names="$ac_cv_f90_module_names $ac_pat"
5382 >  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="NONE"
5383   fi
4295
4296          ;;
4297      *bar*)
4298          ac_pat=`echo $ac_file | sed s/bar/%module%/`
4299            ac_exists=false
4300  for ac_i in $ac_cv_f90_module_names; do
4301    if test x"$ac_pat" = x"$ac_i"; then
4302      ac_exists=true
4303      break
4304    fi
4305  done
4306
4307  if test x"$ac_exists" = xtrue; then
4308  :
4309 else
4310  ac_cv_f90_module_names="$ac_cv_f90_module_names $ac_pat"
5384   fi
5385 <
5386 <          ;;
5387 <      *BAR*)
5388 <          ac_pat=`echo $ac_file | sed s/BAR/%MODULE%/`
4316 <            ac_exists=false
4317 <  for ac_i in $ac_cv_f90_module_names; do
4318 <    if test x"$ac_pat" = x"$ac_i"; then
4319 <      ac_exists=true
4320 <      break
4321 <    fi
4322 <  done
4323 <
4324 <  if test x"$ac_exists" = xtrue; then
4325 <  :
5385 > AR=$ac_cv_prog_AR
5386 > if test -n "$AR"; then
5387 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5388 > $as_echo "$AR" >&6; }
5389   else
5390 <  ac_cv_f90_module_names="$ac_cv_f90_module_names $ac_pat"
5390 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5391 > $as_echo "no" >&6; }
5392   fi
5393  
4330          ;;
4331       # Other files - we have no idea how they are generated
4332       *)
4333          { echo "$as_me:$LINENO: WARNING: Bogus file found: $ac_file" >&5
4334 echo "$as_me: WARNING: Bogus file found: $ac_file" >&2;}
4335          ;;
4336   esac
4337 done
4338 if test "x$ac_cv_f90_module_names" = "x"; then
4339  { echo "$as_me:$LINENO: WARNING: Couldn't determine module file names" >&5
4340 echo "$as_me: WARNING: Couldn't determine module file names" >&2;}
4341 fi
5394  
5395 < else
5396 <  echo "$as_me: failed program was:" >&5
5397 < sed 's/^/| /' conftest.$ac_ext >&5
5398 <
5399 < ac_cv_f90_module_names=
5400 < { echo "$as_me:$LINENO: WARNING: Couldn't determine module file names" >&5
5401 < echo "$as_me: WARNING: Couldn't determine module file names" >&2;}
4350 < fi
4351 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4352 < cd ..
4353 < # cleanup
4354 < rm -rf conftest
4355 < ac_ext=f90
4356 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
4357 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4358 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
4359 <
4360 < fi
4361 < echo "$as_me:$LINENO: result: $ac_cv_f90_module_names" >&5
4362 < echo "${ECHO_T}$ac_cv_f90_module_names" >&6 # AC_CACHE_CHECK
4363 <
4364 < # We now generate a shell script that will help us to figure out the correct
4365 < # module file names, using the value of ac_cv_f90_module_names
4366 <
4367 < echo "Generating shell script modnam"
4368 <
4369 < cat > scripts/modnam << EOF
4370 < #! /bin/sh
4371 < # This script is auto-generated by configure
5395 > if test "$AR" = "NONE"; then
5396 >  cat >confcache <<\_ACEOF
5397 > # This file is a shell script that caches the results of configure
5398 > # tests run on this system so they can be shared between configure
5399 > # scripts and configure runs, see configure's option --config-cache.
5400 > # It is not useful on other systems.  If it contains results you don't
5401 > # want to keep, you may remove or edit it.
5402   #
5403 < usage="\\
5404 < Usage: \$0 [FILES]
5403 > # config.status only pays attention to the cache file if you give it
5404 > # the --recheck option to rerun configure.
5405 > #
5406 > # `ac_cv_env_foo' variables (set or unset) will be overridden when
5407 > # loading this file, other *unset* `ac_cv_foo' will be assigned the
5408 > # following values.
5409  
5410 < [FILES] are Fortran 90 source files.
4377 < The output is a list of module file names that the Fortran 90 compiler
4378 < generates when compiling [FILES]."
5410 > _ACEOF
5411  
5412 < list=
5413 < empty=
5414 <
5415 < if test \$# -eq 0; then
5416 <   echo "\$usage"; exit 0
5417 < fi
5418 <
5419 < while test \$# != 0; do
5420 <
5421 <  file=\$1
5422 <  shift
5423 <
5424 < # strip suffix
5425 <  base=\`echo \$file | sed 's/[.][^.]*$//'\`
5426 <
5427 <  test ! -f \$file && continue
5428 <
5429 < # Look for module definitions and transform them to upper / lower case
5430 <  mods=\`cat \$file | sed '/^ *[mM][oO][dD][uU][lL][eE]/!d;s/^ *[mM][oO][dD][uU][lL][eE] *\([A-Za-z_][A-Za-z0-9_]*\).*\$/\1/'\`
4399 <  upper=\`echo \$mods | tr a-z A-Z\`
4400 <  lower=\`echo \$mods | tr A-Z a-z\`
4401 <
4402 < # Here, the patterns for generating module file names were inserted by configure
4403 <  for trans in $ac_cv_f90_module_names; do
4404 <
4405 <    pat=\`echo \$trans | sed 's/.*\(%.*%\).*/\1/'\`
4406 <    var=empty
4407 <    case \$pat in
4408 <       %MODULE%)
4409 <          var=upper ;;
4410 <       %Module%)
4411 <          var=mods ;;
4412 <       %module%)
4413 <          var=lower ;;
4414 <       %FILE%)
4415 <          test -n "\$mods" && var=base ;;
5412 > # The following way of writing the cache mishandles newlines in values,
5413 > # but we know of no workaround that is simple, portable, and efficient.
5414 > # So, we kill variables containing newlines.
5415 > # Ultrix sh set writes to stderr and can't be redirected directly,
5416 > # and sets the high bit in the cache file unless we assign to the vars.
5417 > (
5418 >  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
5419 >    eval ac_val=\$$ac_var
5420 >    case $ac_val in #(
5421 >    *${as_nl}*)
5422 >      case $ac_var in #(
5423 >      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
5424 > $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
5425 >      esac
5426 >      case $ac_var in #(
5427 >      _ | IFS | as_nl) ;; #(
5428 >      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
5429 >      *) { eval $ac_var=; unset $ac_var;} ;;
5430 >      esac ;;
5431      esac
4417    new=\`eval '(for i in \$'\$var '; do echo \$trans | sed s/\$pat/\$i/; done)'\`
4418    list="\$list \$new"
5432    done
4420 done
5433  
5434 < echo \$list
5435 < # end of configure-generated script
5436 < EOF
5437 < chmod 755 scripts/modnam
5438 <
5439 < pat=`echo $ac_cv_f90_module_names | sed 's/.*\(%.*%\).*/\1/'`
5440 < F90_MODULE_NAMES=empty
5441 < case $pat in
5442 <       %MODULE%)
5443 <          F90_MODULE_NAMES=UPPER ;;
5444 <       %Module%)
5445 <          F90_MODULE_NAMES=Mixed ;;
5446 <       %module%)
5447 <          F90_MODULE_NAMES=lower ;;
5448 <       *)
5449 <          F90_MODULE_NAMES=unknown ;;
5450 < esac
5451 <
5452 < ac_ext=c
5453 < ac_cpp='$CPP $CPPFLAGS'
5454 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5455 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5456 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
5457 <
5458 <
5459 < ac_ext=c
5460 < ac_cpp='$CPP $CPPFLAGS'
5461 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5462 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5463 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
5464 <
5465 < ac_ext=c
5466 < ac_cpp='$CPP $CPPFLAGS'
5467 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4456 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4457 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
4458 < echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4459 < echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
4460 < # On Suns, sometimes $CPP names a directory.
4461 < if test -n "$CPP" && test -d "$CPP"; then
4462 <  CPP=
5434 >  (set) 2>&1 |
5435 >    case $as_nl`(ac_space=' '; set) 2>&1` in #(
5436 >    *${as_nl}ac_space=\ *)
5437 >      # `set' does not quote correctly, so add quotes: double-quote
5438 >      # substitution turns \\\\ into \\, and sed turns \\ into \.
5439 >      sed -n \
5440 >        "s/'/'\\\\''/g;
5441 >          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5442 >      ;; #(
5443 >    *)
5444 >      # `set' quotes correctly as required by POSIX, so do not add quotes.
5445 >      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
5446 >      ;;
5447 >    esac |
5448 >    sort
5449 > ) |
5450 >  sed '
5451 >     /^ac_cv_env_/b end
5452 >     t clear
5453 >     :clear
5454 >     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
5455 >     t end
5456 >     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
5457 >     :end' >>confcache
5458 > if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
5459 >  if test -w "$cache_file"; then
5460 >    test "x$cache_file" != "x/dev/null" &&
5461 >      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
5462 > $as_echo "$as_me: updating cache $cache_file" >&6;}
5463 >    cat confcache >$cache_file
5464 >  else
5465 >    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
5466 > $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
5467 >  fi
5468   fi
5469 < if test -z "$CPP"; then
5470 <  if test "${ac_cv_prog_CPP+set}" = set; then
5471 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5469 > rm -f confcache
5470 >  exit 1
5471 > fi
5472 > # Extract the first word of "ps", so it can be a program name with args.
5473 > set dummy ps; ac_word=$2
5474 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475 > $as_echo_n "checking for $ac_word... " >&6; }
5476 > if test "${ac_cv_path_PS+set}" = set; then :
5477 >  $as_echo_n "(cached) " >&6
5478   else
5479 <      # Double quotes because CPP needs to be expanded
5480 <    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5481 <    do
5482 <      ac_preproc_ok=false
5483 < for ac_c_preproc_warn_flag in '' yes
5479 >  case $PS in
5480 >  [\\/]* | ?:[\\/]*)
5481 >  ac_cv_path_PS="$PS" # Let the user override the test with a path.
5482 >  ;;
5483 >  *)
5484 >  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485 > for as_dir in $PATH
5486   do
5487 <  # Use a header file that comes with gcc, so configuring glibc
5488 <  # with a fresh cross-compiler works.
5489 <  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5490 <  # <limits.h> exists even on freestanding compilers.
5491 <  # On the NeXT, cc -E runs the code through the compiler's parser,
5492 <  # not just through cpp. "Syntax error" is here to catch this case.
5493 <  cat >conftest.$ac_ext <<_ACEOF
4481 < /* confdefs.h.  */
4482 < _ACEOF
4483 < cat confdefs.h >>conftest.$ac_ext
4484 < cat >>conftest.$ac_ext <<_ACEOF
4485 < /* end confdefs.h.  */
4486 < #ifdef __STDC__
4487 < # include <limits.h>
4488 < #else
4489 < # include <assert.h>
4490 < #endif
4491 <                     Syntax error
4492 < _ACEOF
4493 < if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4494 <  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4495 <  ac_status=$?
4496 <  grep -v '^ *+' conftest.er1 >conftest.err
4497 <  rm -f conftest.er1
4498 <  cat conftest.err >&5
4499 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4500 <  (exit $ac_status); } >/dev/null; then
4501 <  if test -s conftest.err; then
4502 <    ac_cpp_err=$ac_c_preproc_warn_flag
4503 <    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4504 <  else
4505 <    ac_cpp_err=
5487 >  IFS=$as_save_IFS
5488 >  test -z "$as_dir" && as_dir=.
5489 >    for ac_exec_ext in '' $ac_executable_extensions; do
5490 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5491 >    ac_cv_path_PS="$as_dir/$ac_word$ac_exec_ext"
5492 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5493 >    break 2
5494    fi
5495 + done
5496 +  done
5497 + IFS=$as_save_IFS
5498 +
5499 +  ;;
5500 + esac
5501 + fi
5502 + PS=$ac_cv_path_PS
5503 + if test -n "$PS"; then
5504 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PS" >&5
5505 + $as_echo "$PS" >&6; }
5506   else
5507 <  ac_cpp_err=yes
5507 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508 > $as_echo "no" >&6; }
5509   fi
5510 < if test -z "$ac_cpp_err"; then
5511 <  :
5510 >
5511 >
5512 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX or BSD ps syntax" >&5
5513 > $as_echo_n "checking for POSIX or BSD ps syntax... " >&6; }
5514 > if test "${ac_cv_prog_ps_syntax+set}" = set; then :
5515 >  $as_echo_n "(cached) " >&6
5516   else
4513  echo "$as_me: failed program was:" >&5
4514 sed 's/^/| /' conftest.$ac_ext >&5
5517  
5518 <  # Broken: fails on valid input.
5519 < continue
5518 >        if $PS ax -o rss > /dev/null 2>&1; then
5519 >                ac_cv_prog_ps_ax=yes
5520 >        else
5521 >                ac_cv_prog_ps_ax=no
5522 >        fi
5523 >        if $PS -ef -o rss > /dev/null 2>&1; then
5524 >                ac_cv_prog_ps_ef=yes
5525 >        else
5526 >                ac_cv_prog_ps_ef=no
5527 >        fi
5528 >        if test "$ac_cv_prog_ps_ax" = yes; then
5529 >                ac_cv_prog_ps_syntax=BSD
5530 >        else
5531 >                if test "$ac_cv_prog_ps_ef" = yes; then
5532 >                        ac_cv_prog_ps_syntax=POSIX
5533 >                else
5534 >                        as_fn_error "Could not determine ps syntax" "$LINENO" 5
5535 >                fi
5536 >        fi
5537 >
5538   fi
5539 < rm -f conftest.err conftest.$ac_ext
5539 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_ps_syntax" >&5
5540 > $as_echo "$ac_cv_prog_ps_syntax" >&6; }
5541  
5542 <  # OK, works on sane cases.  Now check whether non-existent headers
5543 <  # can be detected and how.
4523 <  cat >conftest.$ac_ext <<_ACEOF
4524 < /* confdefs.h.  */
5542 > cat >>confdefs.h <<_ACEOF
5543 > #define PSCOMMAND $PS
5544   _ACEOF
5545 < cat confdefs.h >>conftest.$ac_ext
5546 < cat >>conftest.$ac_ext <<_ACEOF
5547 < /* end confdefs.h.  */
5548 < #include <ac_nonexistent.h>
5549 < _ACEOF
4531 < if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4532 <  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4533 <  ac_status=$?
4534 <  grep -v '^ *+' conftest.er1 >conftest.err
4535 <  rm -f conftest.er1
4536 <  cat conftest.err >&5
4537 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538 <  (exit $ac_status); } >/dev/null; then
4539 <  if test -s conftest.err; then
4540 <    ac_cpp_err=$ac_c_preproc_warn_flag
4541 <    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4542 <  else
4543 <    ac_cpp_err=
4544 <  fi
5545 >
5546 > if test "$ac_cv_prog_ps_syntax" = BSD; then
5547 >
5548 > $as_echo "#define PSTYPE_IS_BSD 1" >>confdefs.h
5549 >
5550   else
5551 <  ac_cpp_err=yes
5551 >   if test "$ac_cv_prog_ps_syntax" = POSIX; then
5552 >
5553 > $as_echo "#define PSTYPE_IS_POSIX 1" >>confdefs.h
5554 >
5555 >   else
5556 >       as_fn_error "Unknown ps syntax type!" "$LINENO" 5
5557 >   fi
5558   fi
5559 < if test -z "$ac_cpp_err"; then
5560 <  # Broken: success on invalid input.
5561 < continue
5559 >
5560 > ac_ext=${ac_fc_srcext-f}
5561 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
5562 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
5563 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
5564 >
5565 > ac_ext=${ac_fc_srcext-f}
5566 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
5567 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
5568 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
5569 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .F90 files" >&5
5570 > $as_echo_n "checking for Fortran flag to compile .F90 files... " >&6; }
5571 > if test "${ac_cv_fc_srcext_F90+set}" = set; then :
5572 >  $as_echo_n "(cached) " >&6
5573   else
5574 <  echo "$as_me: failed program was:" >&5
5575 < sed 's/^/| /' conftest.$ac_ext >&5
5574 >  ac_ext=F90
5575 > ac_fcflags_srcext_save=$ac_fcflags_srcext
5576 > ac_fcflags_srcext=
5577 > ac_cv_fc_srcext_F90=unknown
5578 > for ac_flag in none -qsuffix=f=F90 -Tf; do
5579 >  test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag"
5580 >  cat > conftest.$ac_ext <<_ACEOF
5581 >      program main
5582  
5583 <  # Passes both tests.
5584 < ac_preproc_ok=:
5585 < break
5583 >      end
5584 > _ACEOF
5585 > if ac_fn_fc_try_compile "$LINENO"; then :
5586 >  ac_cv_fc_srcext_F90=$ac_flag; break
5587   fi
5588 < rm -f conftest.err conftest.$ac_ext
4560 <
5588 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5589   done
5590 < # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5591 < rm -f conftest.err conftest.$ac_ext
5592 < if $ac_preproc_ok; then
4565 <  break
5590 > rm -f conftest.$ac_objext conftest.F90
5591 > ac_fcflags_srcext=$ac_fcflags_srcext_save
5592 >
5593   fi
5594 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_F90" >&5
5595 + $as_echo "$ac_cv_fc_srcext_F90" >&6; }
5596 + if test "x$ac_cv_fc_srcext_F90" = xunknown; then
5597 +  as_fn_error "Fortran could not compile .F90 files" "$LINENO" 5
5598 + else
5599 +  ac_fc_srcext=F90
5600 +  if test "x$ac_cv_fc_srcext_F90" = xnone; then
5601 +    ac_fcflags_srcext=""
5602 +    FCFLAGS_F90=""
5603 +  else
5604 +    ac_fcflags_srcext=$ac_cv_fc_srcext_F90
5605 +    FCFLAGS_F90=$ac_cv_fc_srcext_F90
5606 +  fi
5607  
4568    done
4569    ac_cv_prog_CPP=$CPP
5608  
5609   fi
5610 <  CPP=$ac_cv_prog_CPP
5611 < else
5612 <  ac_cv_prog_CPP=$CPP
5613 < fi
5614 < echo "$as_me:$LINENO: result: $CPP" >&5
5615 < echo "${ECHO_T}$CPP" >&6
5616 < ac_preproc_ok=false
5617 < for ac_c_preproc_warn_flag in '' yes
5618 < do
5619 <  # Use a header file that comes with gcc, so configuring glibc
5620 <  # with a fresh cross-compiler works.
4583 <  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4584 <  # <limits.h> exists even on freestanding compilers.
4585 <  # On the NeXT, cc -E runs the code through the compiler's parser,
4586 <  # not just through cpp. "Syntax error" is here to catch this case.
4587 <  cat >conftest.$ac_ext <<_ACEOF
4588 < /* confdefs.h.  */
4589 < _ACEOF
4590 < cat confdefs.h >>conftest.$ac_ext
4591 < cat >>conftest.$ac_ext <<_ACEOF
4592 < /* end confdefs.h.  */
4593 < #ifdef __STDC__
4594 < # include <limits.h>
4595 < #else
4596 < # include <assert.h>
4597 < #endif
4598 <                     Syntax error
4599 < _ACEOF
4600 < if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4601 <  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4602 <  ac_status=$?
4603 <  grep -v '^ *+' conftest.er1 >conftest.err
4604 <  rm -f conftest.er1
4605 <  cat conftest.err >&5
4606 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4607 <  (exit $ac_status); } >/dev/null; then
4608 <  if test -s conftest.err; then
4609 <    ac_cpp_err=$ac_c_preproc_warn_flag
4610 <    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4611 <  else
4612 <    ac_cpp_err=
4613 <  fi
4614 < else
4615 <  ac_cpp_err=yes
4616 < fi
4617 < if test -z "$ac_cpp_err"; then
4618 <  :
4619 < else
4620 <  echo "$as_me: failed program was:" >&5
4621 < sed 's/^/| /' conftest.$ac_ext >&5
5610 > ac_ext=${ac_fc_srcext-f}
5611 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
5612 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
5613 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
5614 >
5615 >
5616 >
5617 >
5618 >
5619 > # Try to determine native compiler flags that allow us to use F90 suffix
5620 > # for preprocessed f90 source.
5621  
5622 <  # Broken: fails on valid input.
5623 < continue
5624 < fi
4626 < rm -f conftest.err conftest.$ac_ext
5622 > if test "$ac_test_PREPFLAG" != "set"; then
5623 >  PREPFLAG=""
5624 >  case "${host_cpu}-${host_os}" in
5625  
5626 <  # OK, works on sane cases.  Now check whether non-existent headers
5627 <  # can be detected and how.
5628 <  cat >conftest.$ac_ext <<_ACEOF
5629 < /* confdefs.h.  */
5630 < _ACEOF
5631 < cat confdefs.h >>conftest.$ac_ext
5632 < cat >>conftest.$ac_ext <<_ACEOF
5633 < /* end confdefs.h.  */
5634 < #include <ac_nonexistent.h>
5635 < _ACEOF
5636 < if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5637 <  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5638 <  ac_status=$?
5639 <  grep -v '^ *+' conftest.er1 >conftest.err
5640 <  rm -f conftest.er1
5641 <  cat conftest.err >&5
4644 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4645 <  (exit $ac_status); } >/dev/null; then
4646 <  if test -s conftest.err; then
4647 <    ac_cpp_err=$ac_c_preproc_warn_flag
4648 <    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4649 <  else
4650 <    ac_cpp_err=
5626 >  *linux*) if test "$FC" = ifc -o "$FC" = ifort; then
5627 >                    PREPFLAG="-fpp1 "
5628 >                fi;;
5629 >  *aix*)  if test "$FC" = xlf90 -o "$FC" = f90 -o "$FC" = xlf95; then
5630 >                    PREPFLAG="-qsuffix=cpp=F90 "
5631 >                fi;;
5632 >  *darwin*)
5633 >        if test "$FC" = f90 -o "$FC" = xlf90 -o "$FC" = xlf95; then
5634 >                PREPFLAG="-qsuffix=cpp=F90 "
5635 >        fi;;
5636 >  esac
5637 >
5638 >  if test -z "$PREPFLAG"; then
5639 >        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Using empty PREPFLAG\"" >&5
5640 > $as_echo "$as_me: WARNING: \"Using empty PREPFLAG\"" >&2;}
5641 >        PREPFLAG=""
5642    fi
4652 else
4653  ac_cpp_err=yes
4654 fi
4655 if test -z "$ac_cpp_err"; then
4656  # Broken: success on invalid input.
4657 continue
4658 else
4659  echo "$as_me: failed program was:" >&5
4660 sed 's/^/| /' conftest.$ac_ext >&5
5643  
5644 <  # Passes both tests.
5645 < ac_preproc_ok=:
4664 < break
4665 < fi
4666 < rm -f conftest.err conftest.$ac_ext
5644 >  { $as_echo "$as_me:${as_lineno-$LINENO}: checking to make sure F90 preprocessor flag works" >&5
5645 > $as_echo_n "checking to make sure F90 preprocessor flag works... " >&6; }
5646  
5647 < done
5648 < # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5649 < rm -f conftest.err conftest.$ac_ext
5650 < if $ac_preproc_ok; then
4672 <  :
4673 < else
4674 <  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4675 < See \`config.log' for more details." >&5
4676 < echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4677 < See \`config.log' for more details." >&2;}
4678 <   { (exit 1); exit 1; }; }
4679 < fi
5647 >  ac_ext=${ac_fc_srcext-f}
5648 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
5649 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
5650 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
5651  
5652 < ac_ext=c
5653 < ac_cpp='$CPP $CPPFLAGS'
5654 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4684 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4685 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
5652 >  ac_save_ext=$ac_ext
5653 >  ac_ext=F90
5654 >  ac_save_FCFLAGS_SRCEXT=$FCFLAGS_SRCEXT
5655  
5656 <
5657 < echo "$as_me:$LINENO: checking for egrep" >&5
4689 < echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4690 < if test "${ac_cv_prog_egrep+set}" = set; then
4691 <  echo $ECHO_N "(cached) $ECHO_C" >&6
4692 < else
4693 <  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4694 <    then ac_cv_prog_egrep='grep -E'
4695 <    else ac_cv_prog_egrep='egrep'
4696 <    fi
5656 >  if test "$PREPFLAG"; then :
5657 >  FCFLAGS_SRCEXT="${PREPFLAG}"
5658   fi
5659 < echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4699 < echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4700 < EGREP=$ac_cv_prog_egrep
5659 >    cat > conftest.$ac_ext <<_ACEOF
5660  
5661  
5662 < echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5663 < echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5664 < if test "${ac_cv_header_stdc+set}" = set; then
5665 <  echo $ECHO_N "(cached) $ECHO_C" >&6
4707 < else
4708 <  cat >conftest.$ac_ext <<_ACEOF
4709 < /* confdefs.h.  */
4710 < _ACEOF
4711 < cat confdefs.h >>conftest.$ac_ext
4712 < cat >>conftest.$ac_ext <<_ACEOF
4713 < /* end confdefs.h.  */
4714 < #include <stdlib.h>
4715 < #include <stdarg.h>
4716 < #include <string.h>
4717 < #include <float.h>
5662 > program conftest
5663 >  integer :: i
5664 >  i = 1
5665 > end program conftest
5666  
4719 int
4720 main ()
4721 {
4722
4723  ;
4724  return 0;
4725 }
5667   _ACEOF
5668 < rm -f conftest.$ac_objext
5669 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4729 <  (eval $ac_compile) 2>conftest.er1
4730 <  ac_status=$?
4731 <  grep -v '^ *+' conftest.er1 >conftest.err
4732 <  rm -f conftest.er1
4733 <  cat conftest.err >&5
4734 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4735 <  (exit $ac_status); } &&
4736 <         { ac_try='test -z "$ac_c_werror_flag"
4737 <                         || test ! -s conftest.err'
4738 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4739 <  (eval $ac_try) 2>&5
4740 <  ac_status=$?
4741 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4742 <  (exit $ac_status); }; } &&
4743 <         { ac_try='test -s conftest.$ac_objext'
4744 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4745 <  (eval $ac_try) 2>&5
4746 <  ac_status=$?
4747 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4748 <  (exit $ac_status); }; }; then
4749 <  ac_cv_header_stdc=yes
5668 > if ac_fn_fc_try_compile "$LINENO"; then :
5669 >  prepflagworks=1
5670   else
5671 <  echo "$as_me: failed program was:" >&5
4752 < sed 's/^/| /' conftest.$ac_ext >&5
4753 <
4754 < ac_cv_header_stdc=no
5671 >  prepflagworks=0
5672   fi
5673 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5673 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5674  
5675 < if test $ac_cv_header_stdc = yes; then
5676 <  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5677 <  cat >conftest.$ac_ext <<_ACEOF
5678 < /* confdefs.h.  */
5679 < _ACEOF
5680 < cat confdefs.h >>conftest.$ac_ext
4764 < cat >>conftest.$ac_ext <<_ACEOF
4765 < /* end confdefs.h.  */
4766 < #include <string.h>
5675 >  FCFLAGS_SRCEXT=$ac_save_FCFLAGS_SRCEXT
5676 >  ac_ext=$ac_save_ext
5677 >  ac_ext=${ac_fc_srcext-f}
5678 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
5679 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
5680 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
5681  
4768 _ACEOF
4769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4770  $EGREP "memchr" >/dev/null 2>&1; then
4771  :
4772 else
4773  ac_cv_header_stdc=no
4774 fi
4775 rm -f conftest*
5682  
5683 +  if test "$prepflagworks" = 1; then
5684 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5685 + $as_echo "yes" >&6; }
5686 +    FCFLAGS_SRCEXT="${PREPFLAG}"
5687 +
5688 +  else
5689 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5690 + $as_echo "no" >&6; }
5691 +    as_fn_error "Can't figure out working Fortran90 preprocessor flag" "$LINENO" 5
5692 +  fi
5693   fi
5694  
4779 if test $ac_cv_header_stdc = yes; then
4780  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4781  cat >conftest.$ac_ext <<_ACEOF
4782 /* confdefs.h.  */
4783 _ACEOF
4784 cat confdefs.h >>conftest.$ac_ext
4785 cat >>conftest.$ac_ext <<_ACEOF
4786 /* end confdefs.h.  */
4787 #include <stdlib.h>
5695  
4789 _ACEOF
4790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4791  $EGREP "free" >/dev/null 2>&1; then
4792  :
4793 else
4794  ac_cv_header_stdc=no
4795 fi
4796 rm -f conftest*
5696  
5697 +
5698 +
5699 + # Try to determine native compiler flags that allow us to use F90 suffix
5700 + # for preprocessed f90 source with -D type defines
5701 +
5702 + if test "$ac_test_PREPDEFFLAG" != "set"; then
5703 +  PREPDEFFLAG=""
5704 +  case "${host_cpu}-${host_os}" in
5705 +
5706 +  *linux*) if test "$FC" = ifc -o "$FC" = ifort; then
5707 +                    PREPDEFFLAG=" "
5708 +                fi;;
5709 +  *aix*)  if test "$FC" = xlf90 -o "$FC" = f90 -o "$FC" = xlf95; then
5710 +                    PREPDEFFLAG="-WF,"
5711 +                fi;;
5712 +  *darwin*)
5713 +        if test "$FC" = f90 -o "$FC" = xlf90 -o "$FC" = xlf95; then
5714 +                PREPDEFFLAG="-WF,"
5715 +        fi;;
5716 +  esac
5717 +
5718 +  if test -z "$PREPDEFFLAG"; then
5719 +        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Using empty PREPDEFFLAG\"" >&5
5720 + $as_echo "$as_me: WARNING: \"Using empty PREPDEFFLAG\"" >&2;}
5721 +        PREPDEFFLAG=" "
5722 +  fi
5723 +
5724 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking to make sure F90 preprocessor define flag works" >&5
5725 + $as_echo_n "checking to make sure F90 preprocessor define flag works... " >&6; }
5726 +
5727 +  ac_ext=${ac_fc_srcext-f}
5728 + ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
5729 + ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
5730 + ac_compiler_gnu=$ac_cv_fc_compiler_gnu
5731 +
5732 +  ac_save_ext=$ac_ext
5733 +  ac_ext=F90
5734 +  ac_save_FCFLAGS=$FCFLAGS
5735 +
5736 +  if test "$PREPDEFFLAG"; then :
5737 +  FCFLAGS="${FCFLAGS} ${PREPDEFFLAG}-DTEST"
5738   fi
5739 +    cat > conftest.$ac_ext <<_ACEOF
5740  
5741 < if test $ac_cv_header_stdc = yes; then
5742 <  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5743 <  if test "$cross_compiling" = yes; then
5744 <  :
5745 < else
4805 <  cat >conftest.$ac_ext <<_ACEOF
4806 < /* confdefs.h.  */
4807 < _ACEOF
4808 < cat confdefs.h >>conftest.$ac_ext
4809 < cat >>conftest.$ac_ext <<_ACEOF
4810 < /* end confdefs.h.  */
4811 < #include <ctype.h>
4812 < #if ((' ' & 0x0FF) == 0x020)
4813 < # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4814 < # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5741 >
5742 > program conftest
5743 >  integer :: i
5744 > #ifdef TEST
5745 >  i = 1
5746   #else
5747 < # define ISLOWER(c) \
4817 <                   (('a' <= (c) && (c) <= 'i') \
4818 <                     || ('j' <= (c) && (c) <= 'r') \
4819 <                     || ('s' <= (c) && (c) <= 'z'))
4820 < # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5747 >  choke me
5748   #endif
5749 + end program conftest
5750  
4823 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4824 int
4825 main ()
4826 {
4827  int i;
4828  for (i = 0; i < 256; i++)
4829    if (XOR (islower (i), ISLOWER (i))
4830        || toupper (i) != TOUPPER (i))
4831      exit(2);
4832  exit (0);
4833 }
5751   _ACEOF
5752 < rm -f conftest$ac_exeext
5753 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4837 <  (eval $ac_link) 2>&5
4838 <  ac_status=$?
4839 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4840 <  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4841 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4842 <  (eval $ac_try) 2>&5
4843 <  ac_status=$?
4844 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4845 <  (exit $ac_status); }; }; then
4846 <  :
5752 > if ac_fn_fc_try_compile "$LINENO"; then :
5753 >  prepdefflagworks=1
5754   else
5755 <  echo "$as_me: program exited with status $ac_status" >&5
4849 < echo "$as_me: failed program was:" >&5
4850 < sed 's/^/| /' conftest.$ac_ext >&5
4851 <
4852 < ( exit $ac_status )
4853 < ac_cv_header_stdc=no
5755 >  prepdefflagworks=0
5756   fi
5757 < rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4856 < fi
4857 < fi
4858 < fi
4859 < echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4860 < echo "${ECHO_T}$ac_cv_header_stdc" >&6
4861 < if test $ac_cv_header_stdc = yes; then
5757 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5758  
5759 < cat >>confdefs.h <<\_ACEOF
5760 < #define STDC_HEADERS 1
5761 < _ACEOF
5759 >  FCFLAGS=$ac_save_FCFLAGS
5760 >  ac_ext=$ac_save_ext
5761 >  ac_ext=${ac_fc_srcext-f}
5762 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
5763 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
5764 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
5765  
4867 fi
5766  
5767 < # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5767 >  if test "$prepdefflagworks" = 1; then
5768 >    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5769 > $as_echo "yes" >&6; }
5770  
5771 +  else
5772 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773 + $as_echo "no" >&6; }
5774 +    as_fn_error "Can't figure out working Fortran90 preprocessor define flag" "$LINENO" 5
5775 +  fi
5776 + fi
5777  
5778 + ac_ext=${ac_fc_srcext-f}
5779 + ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
5780 + ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
5781 + ac_compiler_gnu=$ac_cv_fc_compiler_gnu
5782 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5
5783 + $as_echo_n "checking how to get verbose linking output from $FC... " >&6; }
5784 + if test "${ac_cv_prog_fc_v+set}" = set; then :
5785 +  $as_echo_n "(cached) " >&6
5786 + else
5787 +  cat > conftest.$ac_ext <<_ACEOF
5788 +      program main
5789  
5790 +      end
5791 + _ACEOF
5792 + if ac_fn_fc_try_compile "$LINENO"; then :
5793 +  ac_cv_prog_fc_v=
5794 + # Try some options frequently used verbose output
5795 + for ac_verb in -v -verbose --verbose -V -\#\#\#; do
5796 +  cat > conftest.$ac_ext <<_ACEOF
5797 +      program main
5798  
5799 +      end
5800 + _ACEOF
5801  
5802 + # Compile and link our simple test program by passing a flag (argument
5803 + # 1 to this macro) to the Fortran compiler in order to get
5804 + # "verbose" output that we can then parse for the Fortran linker
5805 + # flags.
5806 + ac_save_FCFLAGS=$FCFLAGS
5807 + FCFLAGS="$FCFLAGS $ac_verb"
5808 + eval "set x $ac_link"
5809 + shift
5810 + $as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
5811 + # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
5812 + # LIBRARY_PATH; skip all such settings.
5813 + ac_fc_v_output=`eval $ac_link 5>&1 2>&1 |
5814 +  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
5815 + $as_echo "$ac_fc_v_output" >&5
5816 + FCFLAGS=$ac_save_FCFLAGS
5817  
5818 + rm -rf conftest*
5819  
5820 + # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
5821 + # /foo, /bar, and /baz are search directories for the Fortran linker.
5822 + # Here, we change these into -L/foo -L/bar -L/baz (and put it first):
5823 + ac_fc_v_output="`echo $ac_fc_v_output |
5824 +        grep 'LPATH is:' |
5825 +        sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output"
5826  
5827 + # FIXME: we keep getting bitten by quoted arguments; a more general fix
5828 + #        that detects unbalanced quotes in FLIBS should be implemented
5829 + #        and (ugh) tested at some point.
5830 + case $ac_fc_v_output in
5831 +  # If we are using xlf then replace all the commas with spaces.
5832 +  *xlfentry*)
5833 +    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/,/ /g'` ;;
5834  
5835 < for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5836 <                  inttypes.h stdint.h unistd.h
5837 < do
5838 < as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4883 < echo "$as_me:$LINENO: checking for $ac_header" >&5
4884 < echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4885 < if eval "test \"\${$as_ac_Header+set}\" = set"; then
4886 <  echo $ECHO_N "(cached) $ECHO_C" >&6
4887 < else
4888 <  cat >conftest.$ac_ext <<_ACEOF
4889 < /* confdefs.h.  */
4890 < _ACEOF
4891 < cat confdefs.h >>conftest.$ac_ext
4892 < cat >>conftest.$ac_ext <<_ACEOF
4893 < /* end confdefs.h.  */
4894 < $ac_includes_default
5835 >  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
5836 >  # $LIBS confuse us, and the libraries appear later in the output anyway).
5837 >  *mGLOB_options_string*)
5838 >    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
5839  
5840 < #include <$ac_header>
5841 < _ACEOF
5842 < rm -f conftest.$ac_objext
5843 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5844 <  (eval $ac_compile) 2>conftest.er1
5845 <  ac_status=$?
5846 <  grep -v '^ *+' conftest.er1 >conftest.err
5847 <  rm -f conftest.er1
4904 <  cat conftest.err >&5
4905 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906 <  (exit $ac_status); } &&
4907 <         { ac_try='test -z "$ac_c_werror_flag"
4908 <                         || test ! -s conftest.err'
4909 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4910 <  (eval $ac_try) 2>&5
4911 <  ac_status=$?
4912 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4913 <  (exit $ac_status); }; } &&
4914 <         { ac_try='test -s conftest.$ac_objext'
4915 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4916 <  (eval $ac_try) 2>&5
4917 <  ac_status=$?
4918 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4919 <  (exit $ac_status); }; }; then
4920 <  eval "$as_ac_Header=yes"
4921 < else
4922 <  echo "$as_me: failed program was:" >&5
4923 < sed 's/^/| /' conftest.$ac_ext >&5
5840 >  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
5841 >  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
5842 >  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
5843 >  *-cmdline\ * | *-ignore\ * | *-def\ *)
5844 >    ac_fc_v_output=`echo $ac_fc_v_output | sed "\
5845 >        s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
5846 >        s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
5847 >        s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
5848  
5849 < eval "$as_ac_Header=no"
5850 < fi
5851 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5852 < fi
4929 < echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4930 < echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4931 < if test `eval echo '${'$as_ac_Header'}'` = yes; then
4932 <  cat >>confdefs.h <<_ACEOF
4933 < #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4934 < _ACEOF
5849 >  # If we are using Cray Fortran then delete quotes.
5850 >  *cft90*)
5851 >    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;;
5852 > esac
5853  
4936 fi
5854  
5855 +  # look for -l* and *.a constructs in the output
5856 +  for ac_arg in $ac_fc_v_output; do
5857 +     case $ac_arg in
5858 +        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
5859 +          ac_cv_prog_fc_v=$ac_verb
5860 +          break 2 ;;
5861 +     esac
5862 +  done
5863   done
5864 <
5865 <
5866 <  # clean out junk possibly left behind by a previous configuration
4942 <  rm -f utils/getopt.h
4943 <  # Check for getopt_long support
4944 <
4945 < for ac_header in getopt.h
4946 < do
4947 < as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4948 < if eval "test \"\${$as_ac_Header+set}\" = set"; then
4949 <  echo "$as_me:$LINENO: checking for $ac_header" >&5
4950 < echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4951 < if eval "test \"\${$as_ac_Header+set}\" = set"; then
4952 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5864 > if test -z "$ac_cv_prog_fc_v"; then
5865 >   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5
5866 > $as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;}
5867   fi
4954 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4955 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5868   else
5869 <  # Is the header compilable?
5870 < echo "$as_me:$LINENO: checking $ac_header usability" >&5
4959 < echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4960 < cat >conftest.$ac_ext <<_ACEOF
4961 < /* confdefs.h.  */
4962 < _ACEOF
4963 < cat confdefs.h >>conftest.$ac_ext
4964 < cat >>conftest.$ac_ext <<_ACEOF
4965 < /* end confdefs.h.  */
4966 < $ac_includes_default
4967 < #include <$ac_header>
4968 < _ACEOF
4969 < rm -f conftest.$ac_objext
4970 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4971 <  (eval $ac_compile) 2>conftest.er1
4972 <  ac_status=$?
4973 <  grep -v '^ *+' conftest.er1 >conftest.err
4974 <  rm -f conftest.er1
4975 <  cat conftest.err >&5
4976 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 <  (exit $ac_status); } &&
4978 <         { ac_try='test -z "$ac_c_werror_flag"
4979 <                         || test ! -s conftest.err'
4980 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4981 <  (eval $ac_try) 2>&5
4982 <  ac_status=$?
4983 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4984 <  (exit $ac_status); }; } &&
4985 <         { ac_try='test -s conftest.$ac_objext'
4986 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4987 <  (eval $ac_try) 2>&5
4988 <  ac_status=$?
4989 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4990 <  (exit $ac_status); }; }; then
4991 <  ac_header_compiler=yes
4992 < else
4993 <  echo "$as_me: failed program was:" >&5
4994 < sed 's/^/| /' conftest.$ac_ext >&5
4995 <
4996 < ac_header_compiler=no
5869 >  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5
5870 > $as_echo "$as_me: WARNING: compilation failed" >&2;}
5871   fi
5872 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4999 < echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5000 < echo "${ECHO_T}$ac_header_compiler" >&6
5872 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5873  
5002 # Is the header present?
5003 echo "$as_me:$LINENO: checking $ac_header presence" >&5
5004 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5005 cat >conftest.$ac_ext <<_ACEOF
5006 /* confdefs.h.  */
5007 _ACEOF
5008 cat confdefs.h >>conftest.$ac_ext
5009 cat >>conftest.$ac_ext <<_ACEOF
5010 /* end confdefs.h.  */
5011 #include <$ac_header>
5012 _ACEOF
5013 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5014  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5015  ac_status=$?
5016  grep -v '^ *+' conftest.er1 >conftest.err
5017  rm -f conftest.er1
5018  cat conftest.err >&5
5019  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5020  (exit $ac_status); } >/dev/null; then
5021  if test -s conftest.err; then
5022    ac_cpp_err=$ac_c_preproc_warn_flag
5023    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5024  else
5025    ac_cpp_err=
5026  fi
5027 else
5028  ac_cpp_err=yes
5874   fi
5875 < if test -z "$ac_cpp_err"; then
5876 <  ac_header_preproc=yes
5875 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5
5876 > $as_echo "$ac_cv_prog_fc_v" >&6; }
5877 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5
5878 > $as_echo_n "checking for Fortran libraries of $FC... " >&6; }
5879 > if test "${ac_cv_fc_libs+set}" = set; then :
5880 >  $as_echo_n "(cached) " >&6
5881   else
5882 <  echo "$as_me: failed program was:" >&5
5883 < sed 's/^/| /' conftest.$ac_ext >&5
5035 <
5036 <  ac_header_preproc=no
5037 < fi
5038 < rm -f conftest.err conftest.$ac_ext
5039 < echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5040 < echo "${ECHO_T}$ac_header_preproc" >&6
5041 <
5042 < # So?  What about this header?
5043 < case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5044 <  yes:no: )
5045 <    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5046 < echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5047 <    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5048 < echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5049 <    ac_header_preproc=yes
5050 <    ;;
5051 <  no:yes:* )
5052 <    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5053 < echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5054 <    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
5055 < echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
5056 <    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5057 < echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5058 <    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
5059 < echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
5060 <    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5061 < echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5062 <    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5063 < echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5064 <    (
5065 <      cat <<\_ASBOX
5066 < ## ------------------------------ ##
5067 < ## Report this to gezelter@nd.edu ##
5068 < ## ------------------------------ ##
5069 < _ASBOX
5070 <    ) |
5071 <      sed "s/^/$as_me: WARNING:     /" >&2
5072 <    ;;
5073 < esac
5074 < echo "$as_me:$LINENO: checking for $ac_header" >&5
5075 < echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5076 < if eval "test \"\${$as_ac_Header+set}\" = set"; then
5077 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5882 >  if test "x$FCLIBS" != "x"; then
5883 >  ac_cv_fc_libs="$FCLIBS" # Let the user override the test.
5884   else
5079  eval "$as_ac_Header=\$ac_header_preproc"
5080 fi
5081 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5082 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5885  
5886 < fi
5887 < if test `eval echo '${'$as_ac_Header'}'` = yes; then
5888 <  cat >>confdefs.h <<_ACEOF
5889 < #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5886 > cat > conftest.$ac_ext <<_ACEOF
5887 >      program main
5888 >
5889 >      end
5890   _ACEOF
5891  
5892 < fi
5892 > # Compile and link our simple test program by passing a flag (argument
5893 > # 1 to this macro) to the Fortran compiler in order to get
5894 > # "verbose" output that we can then parse for the Fortran linker
5895 > # flags.
5896 > ac_save_FCFLAGS=$FCFLAGS
5897 > FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v"
5898 > eval "set x $ac_link"
5899 > shift
5900 > $as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
5901 > # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
5902 > # LIBRARY_PATH; skip all such settings.
5903 > ac_fc_v_output=`eval $ac_link 5>&1 2>&1 |
5904 >  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
5905 > $as_echo "$ac_fc_v_output" >&5
5906 > FCFLAGS=$ac_save_FCFLAGS
5907  
5908 < done
5908 > rm -rf conftest*
5909  
5910 + # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
5911 + # /foo, /bar, and /baz are search directories for the Fortran linker.
5912 + # Here, we change these into -L/foo -L/bar -L/baz (and put it first):
5913 + ac_fc_v_output="`echo $ac_fc_v_output |
5914 +        grep 'LPATH is:' |
5915 +        sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output"
5916  
5917 < for ac_func in getopt_long
5918 < do
5919 < as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5920 < echo "$as_me:$LINENO: checking for $ac_func" >&5
5921 < echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5922 < if eval "test \"\${$as_ac_var+set}\" = set"; then
5923 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5102 < else
5103 <  cat >conftest.$ac_ext <<_ACEOF
5104 < /* confdefs.h.  */
5105 < _ACEOF
5106 < cat confdefs.h >>conftest.$ac_ext
5107 < cat >>conftest.$ac_ext <<_ACEOF
5108 < /* end confdefs.h.  */
5109 < /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5110 <   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5111 < #define $ac_func innocuous_$ac_func
5917 > # FIXME: we keep getting bitten by quoted arguments; a more general fix
5918 > #        that detects unbalanced quotes in FLIBS should be implemented
5919 > #        and (ugh) tested at some point.
5920 > case $ac_fc_v_output in
5921 >  # If we are using xlf then replace all the commas with spaces.
5922 >  *xlfentry*)
5923 >    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/,/ /g'` ;;
5924  
5925 < /* System header to define __stub macros and hopefully few prototypes,
5926 <    which can conflict with char $ac_func (); below.
5927 <    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5928 <    <limits.h> exists even on freestanding compilers.  */
5925 >  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
5926 >  # $LIBS confuse us, and the libraries appear later in the output anyway).
5927 >  *mGLOB_options_string*)
5928 >    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
5929  
5930 < #ifdef __STDC__
5931 < # include <limits.h>
5932 < #else
5933 < # include <assert.h>
5934 < #endif
5930 >  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
5931 >  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
5932 >  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
5933 >  *-cmdline\ * | *-ignore\ * | *-def\ *)
5934 >    ac_fc_v_output=`echo $ac_fc_v_output | sed "\
5935 >        s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
5936 >        s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
5937 >        s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
5938  
5939 < #undef $ac_func
5939 >  # If we are using Cray Fortran then delete quotes.
5940 >  *cft90*)
5941 >    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;;
5942 > esac
5943  
5944 < /* Override any gcc2 internal prototype to avoid an error.  */
5945 < #ifdef __cplusplus
5946 < extern "C"
5947 < {
5944 >
5945 >
5946 > ac_cv_fc_libs=
5947 >
5948 > # Save positional arguments (if any)
5949 > ac_save_positional="$@"
5950 >
5951 > set X $ac_fc_v_output
5952 > while test $# != 1; do
5953 >  shift
5954 >  ac_arg=$1
5955 >  case $ac_arg in
5956 >        [\\/]*.a | ?:[\\/]*.a)
5957 >            ac_exists=false
5958 >  for ac_i in $ac_cv_fc_libs; do
5959 >    if test x"$ac_arg" = x"$ac_i"; then
5960 >      ac_exists=true
5961 >      break
5962 >    fi
5963 >  done
5964 >
5965 >  if test x"$ac_exists" = xtrue; then :
5966 >
5967 > else
5968 >  ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
5969 > fi
5970 >          ;;
5971 >        -bI:*)
5972 >            ac_exists=false
5973 >  for ac_i in $ac_cv_fc_libs; do
5974 >    if test x"$ac_arg" = x"$ac_i"; then
5975 >      ac_exists=true
5976 >      break
5977 >    fi
5978 >  done
5979 >
5980 >  if test x"$ac_exists" = xtrue; then :
5981 >
5982 > else
5983 >  if test "$ac_compiler_gnu" = yes; then
5984 >  for ac_link_opt in $ac_arg; do
5985 >    ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt"
5986 >  done
5987 > else
5988 >  ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
5989 > fi
5990 > fi
5991 >          ;;
5992 >          # Ignore these flags.
5993 >        -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \
5994 >          |-LANG:=* | -LIST:* | -LNO:*)
5995 >          ;;
5996 >        -lkernel32)
5997 >          test x"$CYGWIN" != xyes && ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
5998 >          ;;
5999 >        -[LRuYz])
6000 >          # These flags, when seen by themselves, take an argument.
6001 >          # We remove the space between option and argument and re-iterate
6002 >          # unless we find an empty arg or a new option (starting with -)
6003 >          case $2 in
6004 >             "" | -*);;
6005 >             *)
6006 >                ac_arg="$ac_arg$2"
6007 >                shift; shift
6008 >                set X $ac_arg "$@"
6009 >                ;;
6010 >          esac
6011 >          ;;
6012 >        -YP,*)
6013 >          for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
6014 >              ac_exists=false
6015 >  for ac_i in $ac_cv_fc_libs; do
6016 >    if test x"$ac_j" = x"$ac_i"; then
6017 >      ac_exists=true
6018 >      break
6019 >    fi
6020 >  done
6021 >
6022 >  if test x"$ac_exists" = xtrue; then :
6023 >
6024 > else
6025 >  ac_arg="$ac_arg $ac_j"
6026 >                               ac_cv_fc_libs="$ac_cv_fc_libs $ac_j"
6027 > fi
6028 >          done
6029 >          ;;
6030 >        -[lLR]*)
6031 >            ac_exists=false
6032 >  for ac_i in $ac_cv_fc_libs; do
6033 >    if test x"$ac_arg" = x"$ac_i"; then
6034 >      ac_exists=true
6035 >      break
6036 >    fi
6037 >  done
6038 >
6039 >  if test x"$ac_exists" = xtrue; then :
6040 >
6041 > else
6042 >  ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
6043 > fi
6044 >          ;;
6045 >        -zallextract*| -zdefaultextract)
6046 >          ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
6047 >          ;;
6048 >          # Ignore everything else.
6049 >  esac
6050 > done
6051 > # restore positional arguments
6052 > set X $ac_save_positional; shift
6053 >
6054 > # We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
6055 > # then we insist that the "run path" must be an absolute path (i.e. it
6056 > # must begin with a "/").
6057 > case `(uname -sr) 2>/dev/null` in
6058 >   "SunOS 5"*)
6059 >      ac_ld_run_path=`$as_echo "$ac_fc_v_output" |
6060 >                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
6061 >      test "x$ac_ld_run_path" != x &&
6062 >        if test "$ac_compiler_gnu" = yes; then
6063 >  for ac_link_opt in $ac_ld_run_path; do
6064 >    ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt"
6065 >  done
6066 > else
6067 >  ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path"
6068 > fi
6069 >      ;;
6070 > esac
6071 > fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"
6072 >
6073 > fi
6074 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5
6075 > $as_echo "$ac_cv_fc_libs" >&6; }
6076 > FCLIBS="$ac_cv_fc_libs"
6077 >
6078 >
6079 > ac_ext=${ac_fc_srcext-f}
6080 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6081 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6082 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6083 >
6084 > ac_ext=${ac_fc_srcext-f}
6085 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6086 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6087 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6088 >
6089 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5
6090 > $as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; }
6091 > if test "${ac_cv_fc_dummy_main+set}" = set; then :
6092 >  $as_echo_n "(cached) " >&6
6093 > else
6094 >  ac_fc_dm_save_LIBS=$LIBS
6095 > LIBS="$LIBS $FCLIBS"
6096 > ac_fortran_dm_var=FC_DUMMY_MAIN
6097 > ac_ext=c
6098 > ac_cpp='$CPP $CPPFLAGS'
6099 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6100 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6101 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
6102 >
6103 > # First, try linking without a dummy main:
6104 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6105 > /* end confdefs.h.  */
6106 >
6107 > #ifdef FC_DUMMY_MAIN
6108 > #ifndef FC_DUMMY_MAIN_EQ_F77
6109 > #  ifdef __cplusplus
6110 >     extern "C"
6111 > #  endif
6112 >   int FC_DUMMY_MAIN() { return 1; }
6113   #endif
5131 /* We use char because int might match the return type of a gcc2
5132   builtin and then its argument prototype would still apply.  */
5133 char $ac_func ();
5134 /* The GNU C library defines this for functions which it implements
5135    to always fail with ENOSYS.  Some functions are actually named
5136    something starting with __ and the normal name is an alias.  */
5137 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5138 choke me
5139 #else
5140 char (*f) () = $ac_func;
6114   #endif
6115 < #ifdef __cplusplus
6115 > int
6116 > main ()
6117 > {
6118 >
6119 >  ;
6120 >  return 0;
6121   }
6122 < #endif
6122 > _ACEOF
6123 > if ac_fn_c_try_link "$LINENO"; then :
6124 >  ac_cv_fortran_dummy_main=none
6125 > else
6126 >  ac_cv_fortran_dummy_main=unknown
6127 > fi
6128 > rm -f core conftest.err conftest.$ac_objext \
6129 >    conftest$ac_exeext conftest.$ac_ext
6130  
6131 + if test $ac_cv_fortran_dummy_main = unknown; then
6132 +   for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do
6133 +     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6134 + /* end confdefs.h.  */
6135 + #define $ac_fortran_dm_var $ac_func
6136 + #ifdef FC_DUMMY_MAIN
6137 + #ifndef FC_DUMMY_MAIN_EQ_F77
6138 + #  ifdef __cplusplus
6139 +     extern "C"
6140 + #  endif
6141 +   int FC_DUMMY_MAIN() { return 1; }
6142 + #endif
6143 + #endif
6144   int
6145   main ()
6146   {
6147 < return f != $ac_func;
6147 >
6148    ;
6149    return 0;
6150   }
6151   _ACEOF
6152 < rm -f conftest.$ac_objext conftest$ac_exeext
6153 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6154 <  (eval $ac_link) 2>conftest.er1
6155 <  ac_status=$?
6156 <  grep -v '^ *+' conftest.er1 >conftest.err
6157 <  rm -f conftest.er1
6158 <  cat conftest.err >&5
6159 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6160 <  (exit $ac_status); } &&
6161 <         { ac_try='test -z "$ac_c_werror_flag"
6162 <                         || test ! -s conftest.err'
6163 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6164 <  (eval $ac_try) 2>&5
6165 <  ac_status=$?
5168 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5169 <  (exit $ac_status); }; } &&
5170 <         { ac_try='test -s conftest$ac_exeext'
5171 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5172 <  (eval $ac_try) 2>&5
5173 <  ac_status=$?
5174 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5175 <  (exit $ac_status); }; }; then
5176 <  eval "$as_ac_var=yes"
5177 < else
5178 <  echo "$as_me: failed program was:" >&5
5179 < sed 's/^/| /' conftest.$ac_ext >&5
6152 > if ac_fn_c_try_link "$LINENO"; then :
6153 >  ac_cv_fortran_dummy_main=$ac_func; break
6154 > fi
6155 > rm -f core conftest.err conftest.$ac_objext \
6156 >    conftest$ac_exeext conftest.$ac_ext
6157 >   done
6158 > fi
6159 > ac_ext=${ac_fc_srcext-f}
6160 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6161 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6162 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6163 > ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main
6164 > rm -rf conftest*
6165 > LIBS=$ac_fc_dm_save_LIBS
6166  
5181 eval "$as_ac_var=no"
6167   fi
6168 < rm -f conftest.err conftest.$ac_objext \
6169 <      conftest$ac_exeext conftest.$ac_ext
6170 < fi
6171 < echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6172 < echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6173 < if test `eval echo '${'$as_ac_var'}'` = yes; then
6174 <  cat >>confdefs.h <<_ACEOF
6175 < #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6168 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5
6169 > $as_echo "$ac_cv_fc_dummy_main" >&6; }
6170 > FC_DUMMY_MAIN=$ac_cv_fc_dummy_main
6171 > if test "$FC_DUMMY_MAIN" != unknown; then :
6172 >  if test $FC_DUMMY_MAIN != none; then
6173 >
6174 > cat >>confdefs.h <<_ACEOF
6175 > #define FC_DUMMY_MAIN $FC_DUMMY_MAIN
6176   _ACEOF
6177  
6178 +  if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then
6179 +
6180 + $as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h
6181 +
6182 +  fi
6183 + fi
6184   else
6185 <  # FreeBSD has a gnugetopt library for this
6186 <    echo "$as_me:$LINENO: checking for getopt_long in -lgnugetopt" >&5
6187 < echo $ECHO_N "checking for getopt_long in -lgnugetopt... $ECHO_C" >&6
6188 < if test "${ac_cv_lib_gnugetopt_getopt_long+set}" = set; then
6189 <  echo $ECHO_N "(cached) $ECHO_C" >&6
6190 < else
6191 <  ac_check_lib_save_LIBS=$LIBS
6192 < LIBS="-lgnugetopt  $LIBS"
6193 < cat >conftest.$ac_ext <<_ACEOF
6194 < /* confdefs.h.  */
6185 >  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6186 > $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6187 > as_fn_error "linking to Fortran libraries from C fails
6188 > See \`config.log' for more details." "$LINENO" 5; }
6189 > fi
6190 >
6191 > ac_ext=${ac_fc_srcext-f}
6192 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6193 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6194 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6195 >
6196 > ac_ext=${ac_fc_srcext-f}
6197 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6198 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6199 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6200 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5
6201 > $as_echo_n "checking for Fortran name-mangling scheme... " >&6; }
6202 > if test "${ac_cv_fc_mangling+set}" = set; then :
6203 >  $as_echo_n "(cached) " >&6
6204 > else
6205 >  cat > conftest.$ac_ext <<_ACEOF
6206 >      subroutine foobar()
6207 >      return
6208 >      end
6209 >      subroutine foo_bar()
6210 >      return
6211 >      end
6212   _ACEOF
6213 < cat confdefs.h >>conftest.$ac_ext
6214 < cat >>conftest.$ac_ext <<_ACEOF
6213 > if ac_fn_fc_try_compile "$LINENO"; then :
6214 >  mv conftest.$ac_objext cfortran_test.$ac_objext
6215 >
6216 >  ac_save_LIBS=$LIBS
6217 >  LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS"
6218 >
6219 >  ac_ext=c
6220 > ac_cpp='$CPP $CPPFLAGS'
6221 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6222 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6223 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
6224 >  ac_success=no
6225 >  for ac_foobar in foobar FOOBAR; do
6226 >    for ac_underscore in "" "_"; do
6227 >      ac_func="$ac_foobar$ac_underscore"
6228 >      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6229   /* end confdefs.h.  */
6230  
6231 < /* Override any gcc2 internal prototype to avoid an error.  */
6231 > /* Override any GCC internal prototype to avoid an error.
6232 >   Use char because int might match the return type of a GCC
6233 >   builtin and then its argument prototype would still apply.  */
6234   #ifdef __cplusplus
6235   extern "C"
6236   #endif
6237 < /* We use char because int might match the return type of a gcc2
6237 > char $ac_func ();
6238 > #ifdef FC_DUMMY_MAIN
6239 > #ifndef FC_DUMMY_MAIN_EQ_F77
6240 > #  ifdef __cplusplus
6241 >     extern "C"
6242 > #  endif
6243 >   int FC_DUMMY_MAIN() { return 1; }
6244 > #endif
6245 > #endif
6246 > int
6247 > main ()
6248 > {
6249 > return $ac_func ();
6250 >  ;
6251 >  return 0;
6252 > }
6253 > _ACEOF
6254 > if ac_fn_c_try_link "$LINENO"; then :
6255 >  ac_success=yes; break 2
6256 > fi
6257 > rm -f core conftest.err conftest.$ac_objext \
6258 >    conftest$ac_exeext conftest.$ac_ext
6259 >    done
6260 >  done
6261 >  ac_ext=${ac_fc_srcext-f}
6262 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6263 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6264 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6265 >
6266 >  if test "$ac_success" = "yes"; then
6267 >     case $ac_foobar in
6268 >        foobar)
6269 >           ac_case=lower
6270 >           ac_foo_bar=foo_bar
6271 >           ;;
6272 >        FOOBAR)
6273 >           ac_case=upper
6274 >           ac_foo_bar=FOO_BAR
6275 >           ;;
6276 >     esac
6277 >
6278 >     ac_ext=c
6279 > ac_cpp='$CPP $CPPFLAGS'
6280 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6281 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6282 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
6283 >     ac_success_extra=no
6284 >     for ac_extra in "" "_"; do
6285 >        ac_func="$ac_foo_bar$ac_underscore$ac_extra"
6286 >        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6287 > /* end confdefs.h.  */
6288 >
6289 > /* Override any GCC internal prototype to avoid an error.
6290 >   Use char because int might match the return type of a GCC
6291     builtin and then its argument prototype would still apply.  */
6292 < char getopt_long ();
6292 > #ifdef __cplusplus
6293 > extern "C"
6294 > #endif
6295 > char $ac_func ();
6296 > #ifdef FC_DUMMY_MAIN
6297 > #ifndef FC_DUMMY_MAIN_EQ_F77
6298 > #  ifdef __cplusplus
6299 >     extern "C"
6300 > #  endif
6301 >   int FC_DUMMY_MAIN() { return 1; }
6302 > #endif
6303 > #endif
6304   int
6305   main ()
6306   {
6307 < getopt_long ();
6307 > return $ac_func ();
6308    ;
6309    return 0;
6310   }
6311   _ACEOF
6312 < rm -f conftest.$ac_objext conftest$ac_exeext
6313 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6314 <  (eval $ac_link) 2>conftest.er1
6315 <  ac_status=$?
6316 <  grep -v '^ *+' conftest.er1 >conftest.err
6317 <  rm -f conftest.er1
6318 <  cat conftest.err >&5
6319 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6320 <  (exit $ac_status); } &&
6321 <         { ac_try='test -z "$ac_c_werror_flag"
6322 <                         || test ! -s conftest.err'
6323 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6324 <  (eval $ac_try) 2>&5
6325 <  ac_status=$?
6326 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6327 <  (exit $ac_status); }; } &&
6328 <         { ac_try='test -s conftest$ac_exeext'
6329 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6330 <  (eval $ac_try) 2>&5
6331 <  ac_status=$?
6332 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6333 <  (exit $ac_status); }; }; then
6334 <  ac_cv_lib_gnugetopt_getopt_long=yes
6312 > if ac_fn_c_try_link "$LINENO"; then :
6313 >  ac_success_extra=yes; break
6314 > fi
6315 > rm -f core conftest.err conftest.$ac_objext \
6316 >    conftest$ac_exeext conftest.$ac_ext
6317 >     done
6318 >     ac_ext=${ac_fc_srcext-f}
6319 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6320 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6321 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6322 >
6323 >     if test "$ac_success_extra" = "yes"; then
6324 >        ac_cv_fc_mangling="$ac_case case"
6325 >        if test -z "$ac_underscore"; then
6326 >           ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore"
6327 >        else
6328 >           ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore"
6329 >        fi
6330 >        if test -z "$ac_extra"; then
6331 >           ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore"
6332 >        else
6333 >           ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore"
6334 >        fi
6335 >      else
6336 >        ac_cv_fc_mangling="unknown"
6337 >      fi
6338 >  else
6339 >     ac_cv_fc_mangling="unknown"
6340 >  fi
6341 >
6342 >  LIBS=$ac_save_LIBS
6343 >  rm -rf conftest*
6344 >  rm -f cfortran_test*
6345   else
6346 <  echo "$as_me: failed program was:" >&5
6347 < sed 's/^/| /' conftest.$ac_ext >&5
6346 >  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6347 > $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6348 > as_fn_error "cannot compile a simple Fortran program
6349 > See \`config.log' for more details." "$LINENO" 5; }
6350 > fi
6351 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6352  
5251 ac_cv_lib_gnugetopt_getopt_long=no
6353   fi
6354 < rm -f conftest.err conftest.$ac_objext \
6355 <      conftest$ac_exeext conftest.$ac_ext
5255 < LIBS=$ac_check_lib_save_LIBS
5256 < fi
5257 < echo "$as_me:$LINENO: result: $ac_cv_lib_gnugetopt_getopt_long" >&5
5258 < echo "${ECHO_T}$ac_cv_lib_gnugetopt_getopt_long" >&6
5259 < if test $ac_cv_lib_gnugetopt_getopt_long = yes; then
5260 <  cat >>confdefs.h <<\_ACEOF
5261 < #define HAVE_GETOPT_LONG 1
5262 < _ACEOF
6354 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5
6355 > $as_echo "$ac_cv_fc_mangling" >&6; }
6356  
6357 < else
6358 <  # use the GNU replacement
6359 <      case $LIBOBJS in
6360 <    "getopt.$ac_objext"   | \
5268 <  *" getopt.$ac_objext"   | \
5269 <    "getopt.$ac_objext "* | \
5270 <  *" getopt.$ac_objext "* ) ;;
5271 <  *) LIBOBJS="$LIBOBJS getopt.$ac_objext" ;;
5272 < esac
6357 > ac_ext=${ac_fc_srcext-f}
6358 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6359 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6360 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6361  
6362 <      case $LIBOBJS in
6363 <    "getopt1.$ac_objext"   | \
6364 <  *" getopt1.$ac_objext"   | \
6365 <    "getopt1.$ac_objext "* | \
6366 <  *" getopt1.$ac_objext "* ) ;;
6367 <  *) LIBOBJS="$LIBOBJS getopt1.$ac_objext" ;;
6368 < esac
6362 > ac_ext=${ac_fc_srcext-f}
6363 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6364 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6365 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6366 > case $ac_cv_fc_mangling in
6367 >  "lower case, no underscore, no extra underscore")
6368 >          $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h
6369  
6370 <                ac_config_links="$ac_config_links utils/getopt.h:utils/gnugetopt.h"
6370 >          $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h
6371 > ;;
6372 >  "lower case, no underscore, extra underscore")
6373 >          $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h
6374  
6375 < fi
6375 >          $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h
6376 > ;;
6377 >  "lower case, underscore, no extra underscore")
6378 >          $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h
6379  
6380 < fi
6381 < done
6380 >          $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h
6381 > ;;
6382 >  "lower case, underscore, extra underscore")
6383 >          $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h
6384  
6385 +          $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h
6386 + ;;
6387 +  "upper case, no underscore, no extra underscore")
6388 +          $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h
6389  
6390 +          $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h
6391 + ;;
6392 +  "upper case, no underscore, extra underscore")
6393 +          $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h
6394  
6395 < case $debug in
6396 <  1)
6397 <     ;;
6398 <  *)
6395 >          $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h
6396 > ;;
6397 >  "upper case, underscore, no extra underscore")
6398 >          $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h
6399  
6400 +          $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h
6401 + ;;
6402 +  "upper case, underscore, extra underscore")
6403 +          $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h
6404  
6405 +          $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h
6406 + ;;
6407 +  *)
6408 +          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5
6409 + $as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;}
6410 +          ;;
6411 + esac
6412  
6413 + ac_ext=${ac_fc_srcext-f}
6414 + ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6415 + ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6416 + ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6417  
6418  
6419  
6420 < echo "$as_me:$LINENO: checking whether we are *really* using GNU cc" >&5
6421 < echo $ECHO_N "checking whether we are *really* using GNU cc... $ECHO_C" >&6
6422 < if test "${ac_cv_prog_really_gcc+set}" = set; then
6423 <  echo $ECHO_N "(cached) $ECHO_C" >&6
6420 > ac_ext=${ac_fc_srcext-f}
6421 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6422 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6423 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6424 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5
6425 > $as_echo_n "checking how to get verbose linking output from $FC... " >&6; }
6426 > if test "${ac_cv_prog_fc_v+set}" = set; then :
6427 >  $as_echo_n "(cached) " >&6
6428   else
6429 +  cat > conftest.$ac_ext <<_ACEOF
6430 +      program main
6431  
6432 < cat > conftest.c <<EOF
6433 < #ifdef __GNUC__
6434 <  #ifndef __INTEL_COMPILER
6435 <     yes;
6436 <  #endif
6437 < #endif
6438 < EOF
6439 < if { ac_try='${CC-cc} -E conftest.c'
5315 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5316 <  (eval $ac_try) 2>&5
5317 <  ac_status=$?
5318 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5319 <  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
5320 <  ac_cv_prog_really_gcc=yes
5321 < else
5322 <  ac_cv_prog_really_gcc=no
5323 < fi
6432 >      end
6433 > _ACEOF
6434 > if ac_fn_fc_try_compile "$LINENO"; then :
6435 >  ac_cv_prog_fc_v=
6436 > # Try some options frequently used verbose output
6437 > for ac_verb in -v -verbose --verbose -V -\#\#\#; do
6438 >  cat > conftest.$ac_ext <<_ACEOF
6439 >      program main
6440  
6441 < fi
6442 < echo "$as_me:$LINENO: result: $ac_cv_prog_really_gcc" >&5
5327 < echo "${ECHO_T}$ac_cv_prog_really_gcc" >&6
5328 < if test "$ac_cv_prog_really_gcc" = yes; then
5329 <        :
6441 >      end
6442 > _ACEOF
6443  
6444 < else
6445 <        :
6444 > # Compile and link our simple test program by passing a flag (argument
6445 > # 1 to this macro) to the Fortran compiler in order to get
6446 > # "verbose" output that we can then parse for the Fortran linker
6447 > # flags.
6448 > ac_save_FCFLAGS=$FCFLAGS
6449 > FCFLAGS="$FCFLAGS $ac_verb"
6450 > eval "set x $ac_link"
6451 > shift
6452 > $as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
6453 > # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
6454 > # LIBRARY_PATH; skip all such settings.
6455 > ac_fc_v_output=`eval $ac_link 5>&1 2>&1 |
6456 >  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
6457 > $as_echo "$ac_fc_v_output" >&5
6458 > FCFLAGS=$ac_save_FCFLAGS
6459  
6460 < fi
6460 > rm -rf conftest*
6461  
6462 + # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
6463 + # /foo, /bar, and /baz are search directories for the Fortran linker.
6464 + # Here, we change these into -L/foo -L/bar -L/baz (and put it first):
6465 + ac_fc_v_output="`echo $ac_fc_v_output |
6466 +        grep 'LPATH is:' |
6467 +        sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output"
6468  
6469 < # Try to determine "good" native compiler flags if none specified on command
6470 < # line
6471 < if test "$ac_test_CFLAGS" != "set"; then
6472 <  CFLAGS=""
6473 <  case "${host_cpu}-${host_os}" in
6469 > # FIXME: we keep getting bitten by quoted arguments; a more general fix
6470 > #        that detects unbalanced quotes in FLIBS should be implemented
6471 > #        and (ugh) tested at some point.
6472 > case $ac_fc_v_output in
6473 >  # If we are using xlf then replace all the commas with spaces.
6474 >  *xlfentry*)
6475 >    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/,/ /g'` ;;
6476  
6477 <  *linux*) if test "$CC" = icc; then
6478 <                    CFLAGS="-O"
6479 <                fi;;
6480 <  sparc-solaris2*) if test "$CC" = cc; then
5347 <                    CFLAGS="-native -fast -xO5 -dalign"
5348 <                 fi;;
6477 >  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
6478 >  # $LIBS confuse us, and the libraries appear later in the output anyway).
6479 >  *mGLOB_options_string*)
6480 >    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
6481  
6482 <  alpha*-osf*)  if test "$CC" = cc; then
6483 <                    CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host -arch host -std1"
6484 <                fi;;
6482 >  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
6483 >  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
6484 >  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
6485 >  *-cmdline\ * | *-ignore\ * | *-def\ *)
6486 >    ac_fc_v_output=`echo $ac_fc_v_output | sed "\
6487 >        s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
6488 >        s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
6489 >        s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
6490  
6491 <  hppa*-hpux*)  if test "$CC" = cc; then
6492 <                    CFLAGS="-Ae +O3 +Oall"
6493 <                fi;;
6491 >  # If we are using Cray Fortran then delete quotes.
6492 >  *cft90*)
6493 >    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;;
6494 > esac
6495  
5358   rs6000*-aix*)  if test "$CC" = cc -o "$CC" = xlc; then
5359                    CFLAGS="-O3 -qtune=auto -qansialias -w"
5360                fi;;
5361   powerpc*-aix*)
5362        if test "$CC" = cc -o "$CC" = xlc; then
5363                CFLAGS="-O3 -qtune=auto -qansialias -w"
5364                echo "*******************************************************"
5365                echo "*  You have AIX on an unknown powerpc system.  It is  *"
5366                echo "*  recommended that you use                           *"
5367                echo "*                                                     *"
5368                echo "*    CFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
5369                echo "*                                 ^^^                 *"
5370                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
5371                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
5372                echo "*******************************************************"
5373        fi;;
5374   *darwin*)
5375        if test "$CC" = xlc -o "$CC" = cc; then
5376                CFLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto -qaltivec"
5377        fi;;
5378  esac
6496  
6497 <  # use default flags for gcc on all systems
6498 <  if test $ac_cv_prog_really_gcc = yes; then
6499 <     CFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
6500 <  fi
6501 <
6502 <  # test for gcc-specific flags:
6503 <  if test $ac_cv_prog_really_gcc = yes; then
6504 <    # -malign-double for x86 systems
6505 <
6506 <
6507 < echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -malign-double" >&5
6508 < echo $ECHO_N "checking whether ${CC-cc} accepts -malign-double... $ECHO_C" >&6
5392 < if test "${ac_align_double+set}" = set; then
5393 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5394 < else
5395 <  echo 'void f(){}' > conftest.c
5396 < if test -z "`${CC-cc} -malign-double -c conftest.c 2>&1`"; then
5397 <        ac_align_double=yes
5398 < else
5399 <        ac_align_double=no
6497 >  # look for -l* and *.a constructs in the output
6498 >  for ac_arg in $ac_fc_v_output; do
6499 >     case $ac_arg in
6500 >        [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
6501 >          ac_cv_prog_fc_v=$ac_verb
6502 >          break 2 ;;
6503 >     esac
6504 >  done
6505 > done
6506 > if test -z "$ac_cv_prog_fc_v"; then
6507 >   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5
6508 > $as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;}
6509   fi
5401 rm -f conftest*
5402
5403 fi
5404 echo "$as_me:$LINENO: result: $ac_align_double" >&5
5405 echo "${ECHO_T}$ac_align_double" >&6
5406 if test "$ac_align_double" = yes; then
5407        :
5408        CFLAGS="$CFLAGS -malign-double"
6510   else
6511 <        :
6512 <
6511 >  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5
6512 > $as_echo "$as_me: WARNING: compilation failed" >&2;}
6513   fi
6514 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6515  
5414    # -fstrict-aliasing for gcc-2.95+
5415
5416
5417 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -fstrict-aliasing" >&5
5418 echo $ECHO_N "checking whether ${CC-cc} accepts -fstrict-aliasing... $ECHO_C" >&6
5419 if test "${ac_fstrict_aliasing+set}" = set; then
5420  echo $ECHO_N "(cached) $ECHO_C" >&6
5421 else
5422  echo 'void f(){}' > conftest.c
5423 if test -z "`${CC-cc} -fstrict-aliasing -c conftest.c 2>&1`"; then
5424        ac_fstrict_aliasing=yes
5425 else
5426        ac_fstrict_aliasing=no
6516   fi
6517 < rm -f conftest*
6518 <
6519 < fi
6520 < echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5
6521 < echo "${ECHO_T}$ac_fstrict_aliasing" >&6
6522 < if test "$ac_fstrict_aliasing" = yes; then
5434 <        :
5435 <        CFLAGS="$CFLAGS -fstrict-aliasing"
6517 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5
6518 > $as_echo "$ac_cv_prog_fc_v" >&6; }
6519 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5
6520 > $as_echo_n "checking for Fortran libraries of $FC... " >&6; }
6521 > if test "${ac_cv_fc_libs+set}" = set; then :
6522 >  $as_echo_n "(cached) " >&6
6523   else
6524 <        :
6525 <
5439 < fi
5440 <
5441 <  fi
5442 <
5443 <  CPU_FLAGS=""
5444 <  if test $ac_cv_prog_really_gcc = yes; then
5445 <                  case "${host_cpu}" in
5446 <          i586*)
5447 <
5448 < echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentium" >&5
5449 < echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentium... $ECHO_C" >&6
5450 < if test "${ac_cpu_pentium+set}" = set; then
5451 <  echo $ECHO_N "(cached) $ECHO_C" >&6
6524 >  if test "x$FCLIBS" != "x"; then
6525 >  ac_cv_fc_libs="$FCLIBS" # Let the user override the test.
6526   else
5453  echo 'void f(){}' > conftest.c
5454 if test -z "`${CC-cc} -mcpu=pentium -c conftest.c 2>&1`"; then
5455        ac_cpu_pentium=yes
5456 else
5457        ac_cpu_pentium=no
5458 fi
5459 rm -f conftest*
6527  
6528 < fi
6529 < echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5
5463 < echo "${ECHO_T}$ac_cpu_pentium" >&6
5464 < if test "$ac_cpu_pentium" = yes; then
5465 <        :
5466 <        CPU_FLAGS=-mcpu=pentium
5467 < else
5468 <        :
6528 > cat > conftest.$ac_ext <<_ACEOF
6529 >      program main
6530  
6531 +      end
6532 + _ACEOF
6533  
6534 < echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentium" >&5
6535 < echo $ECHO_N "checking whether ${CC-cc} accepts -mpentium... $ECHO_C" >&6
6536 < if test "${ac_pentium+set}" = set; then
6537 <  echo $ECHO_N "(cached) $ECHO_C" >&6
6538 < else
6539 <  echo 'void f(){}' > conftest.c
6540 < if test -z "`${CC-cc} -mpentium -c conftest.c 2>&1`"; then
6541 <        ac_pentium=yes
6542 < else
6543 <        ac_pentium=no
6544 < fi
6545 < rm -f conftest*
6534 > # Compile and link our simple test program by passing a flag (argument
6535 > # 1 to this macro) to the Fortran compiler in order to get
6536 > # "verbose" output that we can then parse for the Fortran linker
6537 > # flags.
6538 > ac_save_FCFLAGS=$FCFLAGS
6539 > FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v"
6540 > eval "set x $ac_link"
6541 > shift
6542 > $as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
6543 > # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
6544 > # LIBRARY_PATH; skip all such settings.
6545 > ac_fc_v_output=`eval $ac_link 5>&1 2>&1 |
6546 >  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
6547 > $as_echo "$ac_fc_v_output" >&5
6548 > FCFLAGS=$ac_save_FCFLAGS
6549  
6550 < fi
5485 < echo "$as_me:$LINENO: result: $ac_pentium" >&5
5486 < echo "${ECHO_T}$ac_pentium" >&6
5487 < if test "$ac_pentium" = yes; then
5488 <        :
5489 <        CPU_FLAGS=-mpentium
5490 < else
5491 <        :
6550 > rm -rf conftest*
6551  
6552 < fi
6552 > # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
6553 > # /foo, /bar, and /baz are search directories for the Fortran linker.
6554 > # Here, we change these into -L/foo -L/bar -L/baz (and put it first):
6555 > ac_fc_v_output="`echo $ac_fc_v_output |
6556 >        grep 'LPATH is:' |
6557 >        sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output"
6558  
6559 < fi
6559 > # FIXME: we keep getting bitten by quoted arguments; a more general fix
6560 > #        that detects unbalanced quotes in FLIBS should be implemented
6561 > #        and (ugh) tested at some point.
6562 > case $ac_fc_v_output in
6563 >  # If we are using xlf then replace all the commas with spaces.
6564 >  *xlfentry*)
6565 >    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/,/ /g'` ;;
6566  
6567 <                  ;;
6568 <          i686*)
6567 >  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
6568 >  # $LIBS confuse us, and the libraries appear later in the output anyway).
6569 >  *mGLOB_options_string*)
6570 >    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
6571  
6572 < echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=pentiumpro" >&5
6573 < echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=pentiumpro... $ECHO_C" >&6
6574 < if test "${ac_cpu_pentiumpro+set}" = set; then
6575 <  echo $ECHO_N "(cached) $ECHO_C" >&6
6572 >  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
6573 >  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
6574 >  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
6575 >  *-cmdline\ * | *-ignore\ * | *-def\ *)
6576 >    ac_fc_v_output=`echo $ac_fc_v_output | sed "\
6577 >        s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
6578 >        s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
6579 >        s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;
6580 >
6581 >  # If we are using Cray Fortran then delete quotes.
6582 >  *cft90*)
6583 >    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;;
6584 > esac
6585 >
6586 >
6587 >
6588 > ac_cv_fc_libs=
6589 >
6590 > # Save positional arguments (if any)
6591 > ac_save_positional="$@"
6592 >
6593 > set X $ac_fc_v_output
6594 > while test $# != 1; do
6595 >  shift
6596 >  ac_arg=$1
6597 >  case $ac_arg in
6598 >        [\\/]*.a | ?:[\\/]*.a)
6599 >            ac_exists=false
6600 >  for ac_i in $ac_cv_fc_libs; do
6601 >    if test x"$ac_arg" = x"$ac_i"; then
6602 >      ac_exists=true
6603 >      break
6604 >    fi
6605 >  done
6606 >
6607 >  if test x"$ac_exists" = xtrue; then :
6608 >
6609   else
6610 <  echo 'void f(){}' > conftest.c
5506 < if test -z "`${CC-cc} -mcpu=pentiumpro -c conftest.c 2>&1`"; then
5507 <        ac_cpu_pentiumpro=yes
5508 < else
5509 <        ac_cpu_pentiumpro=no
6610 >  ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
6611   fi
6612 < rm -f conftest*
6612 >          ;;
6613 >        -bI:*)
6614 >            ac_exists=false
6615 >  for ac_i in $ac_cv_fc_libs; do
6616 >    if test x"$ac_arg" = x"$ac_i"; then
6617 >      ac_exists=true
6618 >      break
6619 >    fi
6620 >  done
6621  
6622 < fi
5514 < echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5
5515 < echo "${ECHO_T}$ac_cpu_pentiumpro" >&6
5516 < if test "$ac_cpu_pentiumpro" = yes; then
5517 <        :
5518 <        CPU_FLAGS=-mcpu=pentiumpro
5519 < else
5520 <        :
6622 >  if test x"$ac_exists" = xtrue; then :
6623  
5522
5523 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpentiumpro" >&5
5524 echo $ECHO_N "checking whether ${CC-cc} accepts -mpentiumpro... $ECHO_C" >&6
5525 if test "${ac_pentiumpro+set}" = set; then
5526  echo $ECHO_N "(cached) $ECHO_C" >&6
6624   else
6625 <  echo 'void f(){}' > conftest.c
6626 < if test -z "`${CC-cc} -mpentiumpro -c conftest.c 2>&1`"; then
6627 <        ac_pentiumpro=yes
6625 >  if test "$ac_compiler_gnu" = yes; then
6626 >  for ac_link_opt in $ac_arg; do
6627 >    ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt"
6628 >  done
6629   else
6630 <        ac_pentiumpro=no
6630 >  ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
6631   fi
5534 rm -f conftest*
5535
6632   fi
6633 < echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5
6634 < echo "${ECHO_T}$ac_pentiumpro" >&6
6635 < if test "$ac_pentiumpro" = yes; then
6636 <        :
6637 <        CPU_FLAGS=-mpentiumpro
6638 < else
6639 <        :
6633 >          ;;
6634 >          # Ignore these flags.
6635 >        -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \
6636 >          |-LANG:=* | -LIST:* | -LNO:*)
6637 >          ;;
6638 >        -lkernel32)
6639 >          test x"$CYGWIN" != xyes && ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
6640 >          ;;
6641 >        -[LRuYz])
6642 >          # These flags, when seen by themselves, take an argument.
6643 >          # We remove the space between option and argument and re-iterate
6644 >          # unless we find an empty arg or a new option (starting with -)
6645 >          case $2 in
6646 >             "" | -*);;
6647 >             *)
6648 >                ac_arg="$ac_arg$2"
6649 >                shift; shift
6650 >                set X $ac_arg "$@"
6651 >                ;;
6652 >          esac
6653 >          ;;
6654 >        -YP,*)
6655 >          for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
6656 >              ac_exists=false
6657 >  for ac_i in $ac_cv_fc_libs; do
6658 >    if test x"$ac_j" = x"$ac_i"; then
6659 >      ac_exists=true
6660 >      break
6661 >    fi
6662 >  done
6663  
6664 < fi
6664 >  if test x"$ac_exists" = xtrue; then :
6665  
6666 + else
6667 +  ac_arg="$ac_arg $ac_j"
6668 +                               ac_cv_fc_libs="$ac_cv_fc_libs $ac_j"
6669   fi
6670 +          done
6671 +          ;;
6672 +        -[lLR]*)
6673 +            ac_exists=false
6674 +  for ac_i in $ac_cv_fc_libs; do
6675 +    if test x"$ac_arg" = x"$ac_i"; then
6676 +      ac_exists=true
6677 +      break
6678 +    fi
6679 +  done
6680  
6681 <                  ;;
5550 <          powerpc*)
5551 <                cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null`
5552 <                is60x=`echo $cputype | egrep "^600-9e?$"`
5553 <                if test -n "$is60x"; then
6681 >  if test x"$ac_exists" = xtrue; then :
6682  
5555
5556 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=$cputype" >&5
5557 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=$cputype... $ECHO_C" >&6
5558 if test "${ac_m_cpu_60x+set}" = set; then
5559  echo $ECHO_N "(cached) $ECHO_C" >&6
6683   else
6684 <  echo 'void f(){}' > conftest.c
5562 < if test -z "`${CC-cc} -mcpu=$cputype -c conftest.c 2>&1`"; then
5563 <        ac_m_cpu_60x=yes
5564 < else
5565 <        ac_m_cpu_60x=no
6684 >  ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
6685   fi
6686 < rm -f conftest*
6686 >          ;;
6687 >        -zallextract*| -zdefaultextract)
6688 >          ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
6689 >          ;;
6690 >          # Ignore everything else.
6691 >  esac
6692 > done
6693 > # restore positional arguments
6694 > set X $ac_save_positional; shift
6695  
6696 < fi
6697 < echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5
6698 < echo "${ECHO_T}$ac_m_cpu_60x" >&6
6699 < if test "$ac_m_cpu_60x" = yes; then
6700 <        :
6701 <        CPU_FLAGS=-mcpu=$cputype
6696 > # We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
6697 > # then we insist that the "run path" must be an absolute path (i.e. it
6698 > # must begin with a "/").
6699 > case `(uname -sr) 2>/dev/null` in
6700 >   "SunOS 5"*)
6701 >      ac_ld_run_path=`$as_echo "$ac_fc_v_output" |
6702 >                        sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
6703 >      test "x$ac_ld_run_path" != x &&
6704 >        if test "$ac_compiler_gnu" = yes; then
6705 >  for ac_link_opt in $ac_ld_run_path; do
6706 >    ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt"
6707 >  done
6708   else
6709 <        :
6709 >  ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path"
6710 > fi
6711 >      ;;
6712 > esac
6713 > fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"
6714  
6715   fi
6716 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5
6717 + $as_echo "$ac_cv_fc_libs" >&6; }
6718 + FCLIBS="$ac_cv_fc_libs"
6719  
5580                elif test "$cputype" = 750; then
6720  
6721 <
6722 < echo "$as_me:$LINENO: checking whether we are using gcc 2.95 or later" >&5
6723 < echo $ECHO_N "checking whether we are using gcc 2.95 or later... $ECHO_C" >&6
6724 < if test "${ac_cv_prog_gcc_2_95+set}" = set; then
5586 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5587 < else
6721 > ac_ext=${ac_fc_srcext-f}
6722 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6723 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6724 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6725  
6726 < cat > conftest.c <<EOF
6727 < #ifdef __GNUC__ && !defined (__INTEL_COMPILER)
6728 < #  if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
6729 <     yes;
6730 < #  endif
6731 < #endif
6726 >
6727 >
6728 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for module suffix" >&5
6729 > $as_echo_n "checking for module suffix... " >&6; }
6730 > rm -f conftest*
6731 > # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
6732 > rm -f work*
6733 > cat >conftest.$ac_ext <<EOF
6734 >        module conftest
6735 >        integer n
6736 >        parameter (n=1)
6737 >        end module conftest
6738   EOF
6739 < if { ac_try='${CC-cc} -E conftest.c'
6740 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6741 <  (eval $ac_try) 2>&5
6742 <  ac_status=$?
6743 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6744 <  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
6745 <  ac_cv_prog_gcc_2_95=yes
6739 > # SGI and absoft compilers generates module name in upper case!
6740 > testname="conftest"
6741 > modcase="lower"
6742 > if (eval $ac_compile) 2>/dev/null ; then
6743 >    MOD=`ls conftest* | grep -v conftest.$ac_ext | grep -v conftest.o`
6744 >    MOD=`echo "$MOD" | sed -e 's/conftest\.//g'`
6745 >    if test -z "$MOD" ; then
6746 >        MOD=`ls CONFTEST* 2>/dev/null \
6747 >                | grep -v CONFTEST.$ac_ext | grep -v CONFTEST.o`
6748 >        MOD=`echo "$MOD" | sed -e 's/CONFTEST\.//g'`
6749 >        if test -n "$MOD" ; then
6750 >            testname="CONFTEST"
6751 >            modcase="upper"
6752 >        fi
6753 >    fi
6754 >    if test -z "$MOD" ; then
6755 >        { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
6756 > $as_echo "unknown" >&6; }
6757 >        # Use mod if we can't figure it out
6758 >        MOD="mod"
6759 >    else
6760 >        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOD" >&5
6761 > $as_echo "$MOD" >&6; }
6762 >    fi
6763 >    if test -s work.pcl ; then
6764 >        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler generates auxillery files!" >&5
6765 > $as_echo "$as_me: WARNING: Compiler generates auxillery files!" >&2;}
6766 >    fi
6767   else
6768 <  ac_cv_prog_gcc_2_95=no
6768 >    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
6769 > $as_echo "unknown" >&6; }
6770   fi
6771  
5607 fi
5608 echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_95" >&5
5609 echo "${ECHO_T}$ac_cv_prog_gcc_2_95" >&6
5610 if test "$ac_cv_prog_gcc_2_95" = yes; then
5611        :
6772  
6773  
6774 < echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=750" >&5
6775 < echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=750... $ECHO_C" >&6
6776 < if test "${ac_m_cpu_750+set}" = set; then
6777 <  echo $ECHO_N "(cached) $ECHO_C" >&6
6778 < else
6779 <  echo 'void f(){}' > conftest.c
6780 < if test -z "`${CC-cc} -mcpu=750 -c conftest.c 2>&1`"; then
6781 <        ac_m_cpu_750=yes
6782 < else
6783 <        ac_m_cpu_750=no
5624 < fi
6774 >
6775 >
6776 > # Check for module include path (some use -I, some (Solaris) use -M, some
6777 > # (absoft) use -p).
6778 > # Intel compilers use a wierd system: -cl,filename.pcl .  If no file is
6779 > # specified, work.pcl and work.pc are created.  However, if you specify
6780 > # a file, it must contain a the name of a file ending in .pc .  Ugh!
6781 > # Use the module made above
6782 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for module directory path flag" >&5
6783 > $as_echo_n "checking for module directory path flag... " >&6; }
6784   rm -f conftest*
6785 + # Intel ifc compiler generates files by the name of work.pc and work.pcl (!)
6786 + rm -f work*
6787 + cat >conftest.$ac_ext <<EOF
6788 +        module conftest
6789 +        integer n
6790 +        parameter (n=1)
6791 +        end module conftest
6792 + EOF
6793 + # SGI and absoft compilers generates module name in upper case!
6794 + testname="conftest"
6795 + if (eval $ac_compile) 2>/dev/null ; then
6796 +   mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.$ac_ext | grep -v CONFTEST.o`
6797 +   mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'`
6798 +   if test -n "$mod" ; then
6799 +      testname="CONFTEST"
6800 +   fi
6801 +   madedir=0
6802 +   if test ! -d conf ; then mkdir conf ; madedir=1; fi
6803 +   cp $testname.$MOD conf
6804 +   rm -f conftest* CONFTEST*
6805 +   cat >conftest1.$ac_ext <<EOF
6806 +        program main
6807 +        use conftest
6808 +        print *, n
6809 +        end
6810 + EOF
6811 +   F90_WORK_FILES_ARG=""
6812 +   F90MODINCSPEC=""
6813 +   if $FC -c -Iconf $FCFLAGS $FCFLAGS_SRCEXT conftest1.$ac_ext > conftest.out 2>&1 ; then
6814 +       MODDIRFLAG="-I"
6815 +       F90MODINCSPEC="-I<dir>"
6816 +       { $as_echo "$as_me:${as_lineno-$LINENO}: result: -I" >&5
6817 + $as_echo "-I" >&6; }
6818 +   elif $FC -c -Mconf $FCFLAGS $FCFLAGS_SRCEXT conftest1.$ac_ext >> conftest.out 2>&1 ; then
6819 +       MODDIRFLAG="-M"
6820 +       F90MODINCSPEC="-M<dir>"
6821 +       { $as_echo "$as_me:${as_lineno-$LINENO}: result: -M" >&5
6822 + $as_echo "-M" >&6; }
6823 +   elif $FC -c -pconf $FCFLAGS $FCFLAGS_SRCEXT conftest1.$ac_ext >> conftest.out 2>&1 ; then
6824 +       MODDIRFLAG="-p"
6825 +       F90MODINCSPEC="-p<dir>"
6826 +       { $as_echo "$as_me:${as_lineno-$LINENO}: result: -p" >&5
6827 + $as_echo "-p" >&6; }
6828 +   elif test -s work.pc ; then
6829 +        cp work.pc conf/mpimod.pc
6830 +        echo "mpimod.pc" > conf/mpimod.pcl
6831 +        echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl
6832 +        if $FC -c -cl,conf/mpimod.pcl $FCFLAGS $FCFLAGS_SRCEXT conftest1.$ac_ext >>conftest.out 2>&1 ; then
6833 +            MODDIRFLAG='-cl,mpimod.pcl'
6834 +            { $as_echo "$as_me:${as_lineno-$LINENO}: result: -cl,filename where filename contains a list of files and directories" >&5
6835 + $as_echo "-cl,filename where filename contains a list of files and directories" >&6; }
6836 +            F90_WORK_FILES_ARG="-cl,mpimod.pcl"
6837 +            F90MODINCSPEC="-cl,<dir>/<file>mod.pcl"
6838  
6839 < fi
6840 < echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5
6841 < echo "${ECHO_T}$ac_m_cpu_750" >&6
6842 < if test "$ac_m_cpu_750" = yes; then
6843 <        :
6844 <        CPU_FLAGS=-mcpu=750
6845 < else
6846 <        :
6839 >        else
6840 >            # The version of the Intel compiler that I have refuses to let
6841 >            # you put the "work catalog" list anywhere but the current
6842 >            # directory. For example, you cannot in
6843 >         :
6844 >        fi
6845 >   fi
6846 >   if test -z "MODDIRFLAG" ; then
6847 >       { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
6848 > $as_echo "unknown" >&6; }
6849 >   fi
6850  
6851 +
6852 +   rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod*
6853 +   if test $madedir = 1 ; then rmdir conf ; fi
6854   fi
6855  
6856 +
6857 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 90 module file names" >&5
6858 + $as_echo_n "checking for Fortran 90 module file names... " >&6; }
6859 + if test "${ac_cv_f90_module_names+set}" = set; then :
6860 +  $as_echo_n "(cached) " >&6
6861   else
6862 <        :
6862 >  ac_ext=${ac_fc_srcext-f}
6863 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6864 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6865 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6866  
6867 < fi
6867 > # carry out the test in a new directory, so that we don't miss anything
6868 > mkdir conftest
6869 > cd conftest
6870 > cat > conftest.$ac_ext <<_ACEOF
6871 > MODULE Bar
6872 > END MODULE Bar
6873 > _ACEOF
6874 > if ac_fn_fc_try_compile "$LINENO"; then :
6875 >  ac_cv_f90_module_names=
6876 > ac_file_list=*
6877 > for ac_file in $ac_file_list; do
6878 >   case $ac_file in
6879 >      # don't care for original source and object files
6880 >      conftest.$ac_ext | conftest.$ac_objext | conftest.err )
6881 >          :
6882 >          ;;
6883 >      # look for new files derived from the file name
6884 >      *conftest*)
6885 >          ac_pat=`echo $ac_file | sed s/conftest/%FILE%/`
6886 >            ac_exists=false
6887 >  for ac_i in $ac_cv_f90_module_names; do
6888 >    if test x"$ac_pat" = x"$ac_i"; then
6889 >      ac_exists=true
6890 >      break
6891 >    fi
6892 >  done
6893  
6894 <                fi
5644 <                if test -z "$CPU_FLAGS"; then
6894 >  if test x"$ac_exists" = xtrue; then :
6895  
5646
5647 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mcpu=powerpc" >&5
5648 echo $ECHO_N "checking whether ${CC-cc} accepts -mcpu=powerpc... $ECHO_C" >&6
5649 if test "${ac_m_cpu_powerpc+set}" = set; then
5650  echo $ECHO_N "(cached) $ECHO_C" >&6
6896   else
6897 <  echo 'void f(){}' > conftest.c
5653 < if test -z "`${CC-cc} -mcpu=powerpc -c conftest.c 2>&1`"; then
5654 <        ac_m_cpu_powerpc=yes
5655 < else
5656 <        ac_m_cpu_powerpc=no
6897 >  ac_cv_f90_module_names="$ac_cv_f90_module_names $ac_pat"
6898   fi
6899 < rm -f conftest*
6899 >          ;;
6900 >      # look for new files derived from the module name,
6901 >      # with different case translation schemes
6902 >      *Bar*)
6903 >          ac_pat=`echo $ac_file | sed s/Bar/%Module%/`
6904 >            ac_exists=false
6905 >  for ac_i in $ac_cv_f90_module_names; do
6906 >    if test x"$ac_pat" = x"$ac_i"; then
6907 >      ac_exists=true
6908 >      break
6909 >    fi
6910 >  done
6911  
6912 < fi
5661 < echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5
5662 < echo "${ECHO_T}$ac_m_cpu_powerpc" >&6
5663 < if test "$ac_m_cpu_powerpc" = yes; then
5664 <        :
5665 <        CPU_FLAGS=-mcpu=powerpc
5666 < else
5667 <        :
6912 >  if test x"$ac_exists" = xtrue; then :
6913  
6914 + else
6915 +  ac_cv_f90_module_names="$ac_cv_f90_module_names $ac_pat"
6916   fi
6917 +          ;;
6918 +      *bar*)
6919 +          ac_pat=`echo $ac_file | sed s/bar/%module%/`
6920 +            ac_exists=false
6921 +  for ac_i in $ac_cv_f90_module_names; do
6922 +    if test x"$ac_pat" = x"$ac_i"; then
6923 +      ac_exists=true
6924 +      break
6925 +    fi
6926 +  done
6927  
6928 <                fi
5672 <                if test -z "$CPU_FLAGS"; then
6928 >  if test x"$ac_exists" = xtrue; then :
6929  
5674
5675 echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -mpowerpc" >&5
5676 echo $ECHO_N "checking whether ${CC-cc} accepts -mpowerpc... $ECHO_C" >&6
5677 if test "${ac_m_powerpc+set}" = set; then
5678  echo $ECHO_N "(cached) $ECHO_C" >&6
6930   else
6931 <  echo 'void f(){}' > conftest.c
5681 < if test -z "`${CC-cc} -mpowerpc -c conftest.c 2>&1`"; then
5682 <        ac_m_powerpc=yes
5683 < else
5684 <        ac_m_powerpc=no
6931 >  ac_cv_f90_module_names="$ac_cv_f90_module_names $ac_pat"
6932   fi
6933 < rm -f conftest*
6933 >          ;;
6934 >      *BAR*)
6935 >          ac_pat=`echo $ac_file | sed s/BAR/%MODULE%/`
6936 >            ac_exists=false
6937 >  for ac_i in $ac_cv_f90_module_names; do
6938 >    if test x"$ac_pat" = x"$ac_i"; then
6939 >      ac_exists=true
6940 >      break
6941 >    fi
6942 >  done
6943  
6944 < fi
5689 < echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5
5690 < echo "${ECHO_T}$ac_m_powerpc" >&6
5691 < if test "$ac_m_powerpc" = yes; then
5692 <        :
5693 <        CPU_FLAGS=-mpowerpc
5694 < else
5695 <        :
6944 >  if test x"$ac_exists" = xtrue; then :
6945  
6946 + else
6947 +  ac_cv_f90_module_names="$ac_cv_f90_module_names $ac_pat"
6948   fi
6949 <
6950 <                fi
6951 <          esac
6952 <  fi
6953 <
6954 <  if test -n "$CPU_FLAGS"; then
6955 <        CFLAGS="$CFLAGS $CPU_FLAGS"
6956 <  fi
6957 <
6958 <  if test -z "$CFLAGS"; then
6959 <        echo ""
5709 <        echo "********************************************************"
5710 <        echo "* WARNING: Don't know the best CFLAGS for this system  *"
5711 <        echo "* Use  make CFLAGS=..., or edit the top level Makefile *"
5712 <        echo "* (otherwise, a default of CFLAGS=-O3 will be used)    *"
5713 <        echo "********************************************************"
5714 <        echo ""
5715 <        CFLAGS="-O3"
5716 <  fi
5717 <
5718 <
5719 <
5720 < echo "$as_me:$LINENO: checking whether ${CC-cc} accepts ${CFLAGS}" >&5
5721 < echo $ECHO_N "checking whether ${CC-cc} accepts ${CFLAGS}... $ECHO_C" >&6
5722 < if test "${ac_guessed_cflags+set}" = set; then
5723 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5724 < else
5725 <  echo 'void f(){}' > conftest.c
5726 < if test -z "`${CC-cc} ${CFLAGS} -c conftest.c 2>&1`"; then
5727 <        ac_guessed_cflags=yes
5728 < else
5729 <        ac_guessed_cflags=no
6949 >          ;;
6950 >       # Other files - we have no idea how they are generated
6951 >       *)
6952 >          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Bogus file found: $ac_file" >&5
6953 > $as_echo "$as_me: WARNING: Bogus file found: $ac_file" >&2;}
6954 >          ;;
6955 >   esac
6956 > done
6957 > if test "x$ac_cv_f90_module_names" = "x"; then
6958 >  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Couldn't determine module file names" >&5
6959 > $as_echo "$as_me: WARNING: Couldn't determine module file names" >&2;}
6960   fi
5731 rm -f conftest*
6961  
5733 fi
5734 echo "$as_me:$LINENO: result: $ac_guessed_cflags" >&5
5735 echo "${ECHO_T}$ac_guessed_cflags" >&6
5736 if test "$ac_guessed_cflags" = yes; then
5737        :
5738
6962   else
6963 <        :
6964 <
6965 <        echo ""
5743 <        echo "********************************************************"
5744 <        echo "* WARNING: The guessed CFLAGS don't seem to work with  *"
5745 <        echo "* your compiler.                                       *"
5746 <        echo "* Use  make CFLAGS=..., or edit the top level Makefile *"
5747 <        echo "********************************************************"
5748 <        echo ""
5749 <        CFLAGS=""
5750 <
6963 >  ac_cv_f90_module_names=
6964 > { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Couldn't determine module file names" >&5
6965 > $as_echo "$as_me: WARNING: Couldn't determine module file names" >&2;}
6966   fi
6967 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6968 + cd ..
6969 + # cleanup
6970 + rm -rf conftest
6971 + ac_ext=${ac_fc_srcext-f}
6972 + ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
6973 + ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
6974 + ac_compiler_gnu=$ac_cv_fc_compiler_gnu
6975  
5753
6976   fi
6977 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f90_module_names" >&5
6978 + $as_echo "$ac_cv_f90_module_names" >&6; } # AC_CACHE_CHECK
6979  
6980 + # We now generate a shell script that will help us to figure out the correct
6981 + # module file names, using the value of ac_cv_f90_module_names
6982  
6983 + echo "Generating shell script modnam"
6984  
6985 + cat > scripts/modnam << EOF
6986 + #! /bin/sh
6987 + # This script is auto-generated by configure
6988 + #
6989 + usage="\\
6990 + Usage: \$0 [FILES]
6991  
6992 + [FILES] are Fortran 90 source files.
6993 + The output is a list of module file names that the Fortran 90 compiler
6994 + generates when compiling [FILES]."
6995  
6996 + list=
6997 + empty=
6998  
6999 <
7000 < echo "$as_me:$LINENO: checking whether we are *really* using GNU c++" >&5
5763 < echo $ECHO_N "checking whether we are *really* using GNU c++... $ECHO_C" >&6
5764 < if test "${ac_cv_prog_really_gxx+set}" = set; then
5765 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5766 < else
5767 <
5768 < cat > conftest.cpp <<EOF
5769 < #ifdef __GNUC__
5770 <  #ifndef __INTEL_COMPILER
5771 <     yes;
5772 <  #endif
5773 < #endif
5774 < EOF
5775 < if { ac_try='${CXX-c++} -E conftest.cpp'
5776 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5777 <  (eval $ac_try) 2>&5
5778 <  ac_status=$?
5779 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5780 <  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
5781 <  ac_cv_prog_really_gxx=yes
5782 < else
5783 <  ac_cv_prog_really_gxx=no
6999 > if test \$# -eq 0; then
7000 >   echo "\$usage"; exit 0
7001   fi
7002  
7003 < fi
5787 < echo "$as_me:$LINENO: result: $ac_cv_prog_really_gxx" >&5
5788 < echo "${ECHO_T}$ac_cv_prog_really_gxx" >&6
5789 < if test "$ac_cv_prog_really_gxx" = yes; then
5790 <        :
7003 > while test \$# != 0; do
7004  
7005 < else
7006 <        :
7005 >  file=\$1
7006 >  shift
7007  
7008 < fi
7008 > # strip suffix
7009 >  base=\`echo \$file | sed 's/[.][^.]*$//'\`
7010  
7011 +  test ! -f \$file && continue
7012  
7013 < # Try to determine "good" native compiler flags if none specified on command
7014 < # line
7015 < if test "$ac_test_CXXFLAGS" != "set"; then
7016 <  CXXFLAGS=""
5802 <  case "${host_cpu}-${host_os}" in
7013 > # Look for module definitions and transform them to upper / lower case
7014 >  mods=\`cat \$file | sed '/^ *[mM][oO][dD][uU][lL][eE]/!d;s/^ *[mM][oO][dD][uU][lL][eE] *\([A-Za-z_][A-Za-z0-9_]*\).*\$/\1/'\`
7015 >  upper=\`echo \$mods | tr a-z A-Z\`
7016 >  lower=\`echo \$mods | tr A-Z a-z\`
7017  
7018 <  *linux*) if test "$CXX" = icc -o "$CXX" = icpc; then
7019 <                    CXXFLAGS="-O"
5806 <                fi;;
5807 <  sparc-solaris2*) if test "$CXX" = CC; then
5808 <                    CXXFLAGS="-native -fast -xO5 -dalign"
5809 <                 fi;;
5810 <   rs6000*-aix*)  if test "$CXX" = xlC; then
5811 <                    CXXFLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w"
5812 <                fi;;
5813 <   powerpc*-aix*)
5814 <        if test "$CXX" = xlC; then
5815 <                CXXFLAGS="-O3 -qarch=ppc -qansialias -w"
5816 <                echo "*******************************************************"
5817 <                echo "*  You have AIX on an unknown powerpc system.  It is  *"
5818 <                echo "*  recommended that you use                           *"
5819 <                echo "*                                                     *"
5820 <                echo "*  CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
5821 <                echo "*                                 ^^^                 *"
5822 <                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
5823 <                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
5824 <                echo "*******************************************************"
5825 <        fi;;
5826 <   *darwin*)
5827 <        if test "$CXX" = xlc++; then
5828 <                CXXFLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto -qaltivec"
5829 <        fi;;
5830 <  esac
7018 > # Here, the patterns for generating module file names were inserted by configure
7019 >  for trans in $ac_cv_f90_module_names; do
7020  
7021 <  # use default flags for gcc on all systems
7022 <  if test $ac_cv_prog_really_gxx = yes; then
7023 <     CXXFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
7024 <  fi
7021 >    pat=\`echo \$trans | sed 's/.*\(%.*%\).*/\1/'\`
7022 >    var=empty
7023 >    case \$pat in
7024 >       %MODULE%)
7025 >          var=upper ;;
7026 >       %Module%)
7027 >          var=mods ;;
7028 >       %module%)
7029 >          var=lower ;;
7030 >       %FILE%)
7031 >          test -n "\$mods" && var=base ;;
7032 >    esac
7033 >    new=\`eval '(for i in \$'\$var '; do echo \$trans | sed s/\$pat/\$i/; done)'\`
7034 >    list="\$list \$new"
7035 >  done
7036 > done
7037  
7038 <  # test for gcc-specific flags:
7039 <  if test $ac_cv_prog_really_gxx = yes; then
7040 <    # -malign-double for x86 systems
7038 > echo \$list
7039 > # end of configure-generated script
7040 > EOF
7041 > chmod 755 scripts/modnam
7042  
7043 + pat=`echo $ac_cv_f90_module_names | sed 's/.*\(%.*%\).*/\1/'`
7044 + F90_MODULE_NAMES=empty
7045 + case $pat in
7046 +       %MODULE%)
7047 +          F90_MODULE_NAMES=UPPER ;;
7048 +       %Module%)
7049 +          F90_MODULE_NAMES=Mixed ;;
7050 +       %module%)
7051 +          F90_MODULE_NAMES=lower ;;
7052 +       *)
7053 +          F90_MODULE_NAMES=unknown ;;
7054 + esac
7055  
7056 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -malign-double" >&5
7057 < echo $ECHO_N "checking whether ${CXX-c++} accepts -malign-double... $ECHO_C" >&6
7058 < if test "${ac_align_double+set}" = set; then
7059 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5846 < else
5847 <  echo 'void f(){}' > conftest.cpp
5848 < if test -z "`${CXX-c++} -malign-double -c conftest.cpp 2>&1`"; then
5849 <        ac_align_double=yes
5850 < else
5851 <        ac_align_double=no
5852 < fi
5853 < rm -f conftest*
7056 > ac_ext=${ac_fc_srcext-f}
7057 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
7058 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
7059 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
7060  
5855 fi
5856 echo "$as_me:$LINENO: result: $ac_align_double" >&5
5857 echo "${ECHO_T}$ac_align_double" >&6
5858 if test "$ac_align_double" = yes; then
5859        :
5860        CXXFLAGS="$CXXFLAGS -malign-double"
5861 else
5862        :
7061  
7062 < fi
7063 <
7064 <    # -fstrict-aliasing for gcc-2.95+
7065 <
7066 <
5869 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -fstrict-aliasing" >&5
5870 < echo $ECHO_N "checking whether ${CXX-c++} accepts -fstrict-aliasing... $ECHO_C" >&6
5871 < if test "${ac_fstrict_aliasing+set}" = set; then
5872 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5873 < else
5874 <  echo 'void f(){}' > conftest.cpp
5875 < if test -z "`${CXX-c++} -fstrict-aliasing -c conftest.cpp 2>&1`"; then
5876 <        ac_fstrict_aliasing=yes
5877 < else
5878 <        ac_fstrict_aliasing=no
5879 < fi
5880 < rm -f conftest*
5881 <
5882 < fi
5883 < echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5
5884 < echo "${ECHO_T}$ac_fstrict_aliasing" >&6
5885 < if test "$ac_fstrict_aliasing" = yes; then
5886 <        :
5887 <        CXXFLAGS="$CXXFLAGS -fstrict-aliasing"
5888 < else
5889 <        :
5890 <
5891 < fi
5892 <
5893 <  fi
5894 <
5895 <  CPU_FLAGS=""
5896 <  if test $ac_cv_prog_really_gxx = yes; then
5897 <                  case "${host_cpu}" in
5898 <          i586*)
5899 <
5900 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=pentium" >&5
5901 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=pentium... $ECHO_C" >&6
5902 < if test "${ac_cpu_pentium+set}" = set; then
5903 <  echo $ECHO_N "(cached) $ECHO_C" >&6
5904 < else
5905 <  echo 'void f(){}' > conftest.cpp
5906 < if test -z "`${CXX-c++} -mcpu=pentium -c conftest.cpp 2>&1`"; then
5907 <        ac_cpu_pentium=yes
5908 < else
5909 <        ac_cpu_pentium=no
5910 < fi
5911 < rm -f conftest*
5912 <
5913 < fi
5914 < echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5
5915 < echo "${ECHO_T}$ac_cpu_pentium" >&6
5916 < if test "$ac_cpu_pentium" = yes; then
5917 <        :
5918 <        CPU_FLAGS=-mcpu=pentium
5919 < else
5920 <        :
5921 <
7062 > ac_ext=c
7063 > ac_cpp='$CPP $CPPFLAGS'
7064 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7065 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7066 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
7067  
7068 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentium" >&5
7069 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentium... $ECHO_C" >&6
7070 < if test "${ac_pentium+set}" = set; then
7071 <  echo $ECHO_N "(cached) $ECHO_C" >&6
7068 >
7069 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for asin in -lm" >&5
7070 > $as_echo_n "checking for asin in -lm... " >&6; }
7071 > if test "${ac_cv_lib_m_asin+set}" = set; then :
7072 >  $as_echo_n "(cached) " >&6
7073   else
7074 <  echo 'void f(){}' > conftest.cpp
7075 < if test -z "`${CXX-c++} -mpentium -c conftest.cpp 2>&1`"; then
7076 <        ac_pentium=yes
7074 >  ac_check_lib_save_LIBS=$LIBS
7075 > LIBS="-lm  $LIBS"
7076 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7077 > /* end confdefs.h.  */
7078 >
7079 > /* Override any GCC internal prototype to avoid an error.
7080 >   Use char because int might match the return type of a GCC
7081 >   builtin and then its argument prototype would still apply.  */
7082 > #ifdef __cplusplus
7083 > extern "C"
7084 > #endif
7085 > char asin ();
7086 > #ifdef FC_DUMMY_MAIN
7087 > #ifndef FC_DUMMY_MAIN_EQ_F77
7088 > #  ifdef __cplusplus
7089 >     extern "C"
7090 > #  endif
7091 >   int FC_DUMMY_MAIN() { return 1; }
7092 > #endif
7093 > #endif
7094 > int
7095 > main ()
7096 > {
7097 > return asin ();
7098 >  ;
7099 >  return 0;
7100 > }
7101 > _ACEOF
7102 > if ac_fn_c_try_link "$LINENO"; then :
7103 >  ac_cv_lib_m_asin=yes
7104   else
7105 <        ac_pentium=no
7105 >  ac_cv_lib_m_asin=no
7106   fi
7107 < rm -f conftest*
7108 <
7107 > rm -f core conftest.err conftest.$ac_objext \
7108 >    conftest$ac_exeext conftest.$ac_ext
7109 > LIBS=$ac_check_lib_save_LIBS
7110   fi
7111 < echo "$as_me:$LINENO: result: $ac_pentium" >&5
7112 < echo "${ECHO_T}$ac_pentium" >&6
7113 < if test "$ac_pentium" = yes; then
7114 <        :
7115 <        CPU_FLAGS=-mpentium
7116 < else
5943 <        :
7111 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_asin" >&5
7112 > $as_echo "$ac_cv_lib_m_asin" >&6; }
7113 > if test "x$ac_cv_lib_m_asin" = x""yes; then :
7114 >  cat >>confdefs.h <<_ACEOF
7115 > #define HAVE_LIBM 1
7116 > _ACEOF
7117  
7118 < fi
7118 >  LIBS="-lm $LIBS"
7119  
7120 + else
7121 +  exit
7122   fi
7123  
5949                  ;;
5950          i686*)
7124  
7125 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=pentiumpro" >&5
7126 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=pentiumpro... $ECHO_C" >&6
7127 < if test "${ac_cpu_pentiumpro+set}" = set; then
7128 <  echo $ECHO_N "(cached) $ECHO_C" >&6
7125 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7126 > $as_echo_n "checking for ANSI C header files... " >&6; }
7127 > if test "${ac_cv_header_stdc+set}" = set; then :
7128 >  $as_echo_n "(cached) " >&6
7129   else
7130 <  echo 'void f(){}' > conftest.cpp
7131 < if test -z "`${CXX-c++} -mcpu=pentiumpro -c conftest.cpp 2>&1`"; then
7132 <        ac_cpu_pentiumpro=yes
7130 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7131 > /* end confdefs.h.  */
7132 > #include <stdlib.h>
7133 > #include <stdarg.h>
7134 > #include <string.h>
7135 > #include <float.h>
7136 >
7137 > #ifdef FC_DUMMY_MAIN
7138 > #ifndef FC_DUMMY_MAIN_EQ_F77
7139 > #  ifdef __cplusplus
7140 >     extern "C"
7141 > #  endif
7142 >   int FC_DUMMY_MAIN() { return 1; }
7143 > #endif
7144 > #endif
7145 > int
7146 > main ()
7147 > {
7148 >
7149 >  ;
7150 >  return 0;
7151 > }
7152 > _ACEOF
7153 > if ac_fn_c_try_compile "$LINENO"; then :
7154 >  ac_cv_header_stdc=yes
7155   else
7156 <        ac_cpu_pentiumpro=no
7156 >  ac_cv_header_stdc=no
7157   fi
7158 < rm -f conftest*
7158 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7159  
7160 < fi
7161 < echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5
7162 < echo "${ECHO_T}$ac_cpu_pentiumpro" >&6
7163 < if test "$ac_cpu_pentiumpro" = yes; then
7164 <        :
5970 <        CPU_FLAGS=-mcpu=pentiumpro
5971 < else
5972 <        :
7160 > if test $ac_cv_header_stdc = yes; then
7161 >  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7162 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7163 > /* end confdefs.h.  */
7164 > #include <string.h>
7165  
7166 + _ACEOF
7167 + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7168 +  $EGREP "memchr" >/dev/null 2>&1; then :
7169  
5975 echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpentiumpro" >&5
5976 echo $ECHO_N "checking whether ${CXX-c++} accepts -mpentiumpro... $ECHO_C" >&6
5977 if test "${ac_pentiumpro+set}" = set; then
5978  echo $ECHO_N "(cached) $ECHO_C" >&6
7170   else
7171 <  echo 'void f(){}' > conftest.cpp
5981 < if test -z "`${CXX-c++} -mpentiumpro -c conftest.cpp 2>&1`"; then
5982 <        ac_pentiumpro=yes
5983 < else
5984 <        ac_pentiumpro=no
7171 >  ac_cv_header_stdc=no
7172   fi
7173   rm -f conftest*
7174  
7175   fi
5989 echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5
5990 echo "${ECHO_T}$ac_pentiumpro" >&6
5991 if test "$ac_pentiumpro" = yes; then
5992        :
5993        CPU_FLAGS=-mpentiumpro
5994 else
5995        :
7176  
7177 < fi
7177 > if test $ac_cv_header_stdc = yes; then
7178 >  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7179 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7180 > /* end confdefs.h.  */
7181 > #include <stdlib.h>
7182  
7183 < fi
7183 > _ACEOF
7184 > if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7185 >  $EGREP "free" >/dev/null 2>&1; then :
7186  
6001                  ;;
6002          powerpc*)
6003                cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null`
6004                is60x=`echo $cputype | egrep "^600-9e?$"`
6005                if test -n "$is60x"; then
6006
6007
6008 echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=$cputype" >&5
6009 echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=$cputype... $ECHO_C" >&6
6010 if test "${ac_m_cpu_60x+set}" = set; then
6011  echo $ECHO_N "(cached) $ECHO_C" >&6
7187   else
7188 <  echo 'void f(){}' > conftest.cpp
6014 < if test -z "`${CXX-c++} -mcpu=$cputype -c conftest.cpp 2>&1`"; then
6015 <        ac_m_cpu_60x=yes
6016 < else
6017 <        ac_m_cpu_60x=no
7188 >  ac_cv_header_stdc=no
7189   fi
7190   rm -f conftest*
7191  
7192   fi
7193 < echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5
7194 < echo "${ECHO_T}$ac_m_cpu_60x" >&6
7195 < if test "$ac_m_cpu_60x" = yes; then
7196 <        :
7197 <        CPU_FLAGS=-mcpu=$cputype
7193 >
7194 > if test $ac_cv_header_stdc = yes; then
7195 >  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7196 >  if test "$cross_compiling" = yes; then :
7197 >  :
7198   else
7199 <        :
7199 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200 > /* end confdefs.h.  */
7201 > #include <ctype.h>
7202 > #include <stdlib.h>
7203 > #if ((' ' & 0x0FF) == 0x020)
7204 > # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7205 > # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7206 > #else
7207 > # define ISLOWER(c) \
7208 >                   (('a' <= (c) && (c) <= 'i') \
7209 >                     || ('j' <= (c) && (c) <= 'r') \
7210 >                     || ('s' <= (c) && (c) <= 'z'))
7211 > # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7212 > #endif
7213  
7214 < fi
7214 > #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7215 > int
7216 > main ()
7217 > {
7218 >  int i;
7219 >  for (i = 0; i < 256; i++)
7220 >    if (XOR (islower (i), ISLOWER (i))
7221 >        || toupper (i) != TOUPPER (i))
7222 >      return 2;
7223 >  return 0;
7224 > }
7225 > _ACEOF
7226 > if ac_fn_c_try_run "$LINENO"; then :
7227  
6032                elif test "$cputype" = 750; then
6033
6034
6035 echo "$as_me:$LINENO: checking whether we are using g++ 2.95 or later" >&5
6036 echo $ECHO_N "checking whether we are using g++ 2.95 or later... $ECHO_C" >&6
6037 if test "${ac_cv_prog_gxx_2_95+set}" = set; then
6038  echo $ECHO_N "(cached) $ECHO_C" >&6
7228   else
7229 <
6041 < cat > conftest.cpp <<EOF
6042 < #ifdef __GNUC__ && !defined (__INTEL_COMPILER)
6043 < #  if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
6044 <     yes;
6045 < #  endif
6046 < #endif
6047 < EOF
6048 < if { ac_try='${CXX-c++} -E conftest.cpp'
6049 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6050 <  (eval $ac_try) 2>&5
6051 <  ac_status=$?
6052 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6053 <  (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
6054 <  ac_cv_prog_gxx_2_95=yes
6055 < else
6056 <  ac_cv_prog_gxx_2_95=no
7229 >  ac_cv_header_stdc=no
7230   fi
7231 + rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7232 +  conftest.$ac_objext conftest.beam conftest.$ac_ext
7233 + fi
7234  
7235   fi
7236 < echo "$as_me:$LINENO: result: $ac_cv_prog_gxx_2_95" >&5
7237 < echo "${ECHO_T}$ac_cv_prog_gxx_2_95" >&6
7238 < if test "$ac_cv_prog_gxx_2_95" = yes; then
7239 <        :
7236 > fi
7237 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7238 > $as_echo "$ac_cv_header_stdc" >&6; }
7239 > if test $ac_cv_header_stdc = yes; then
7240  
7241 + $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7242  
6066 echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=750" >&5
6067 echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=750... $ECHO_C" >&6
6068 if test "${ac_m_cpu_750+set}" = set; then
6069  echo $ECHO_N "(cached) $ECHO_C" >&6
6070 else
6071  echo 'void f(){}' > conftest.cpp
6072 if test -z "`${CXX-c++} -mcpu=750 -c conftest.cpp 2>&1`"; then
6073        ac_m_cpu_750=yes
6074 else
6075        ac_m_cpu_750=no
7243   fi
6077 rm -f conftest*
7244  
7245 < fi
7246 < echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5
7247 < echo "${ECHO_T}$ac_m_cpu_750" >&6
7248 < if test "$ac_m_cpu_750" = yes; then
7249 <        :
7250 <        CPU_FLAGS=-mcpu=750
7251 < else
7252 <        :
7245 > # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7246 > for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7247 >                  inttypes.h stdint.h unistd.h
7248 > do :
7249 >  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7250 > ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7251 > "
7252 > eval as_val=\$$as_ac_Header
7253 >   if test "x$as_val" = x""yes; then :
7254 >  cat >>confdefs.h <<_ACEOF
7255 > #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7256 > _ACEOF
7257  
7258   fi
7259  
7260 < else
6091 <        :
7260 > done
7261  
6093 fi
7262  
7263 <                fi
7264 <                if test -z "$CPU_FLAGS"; then
7263 > #
7264 > # Handle user hints
7265 > #
7266  
7267 <
7268 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mcpu=powerpc" >&5
7269 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mcpu=powerpc... $ECHO_C" >&6
6101 < if test "${ac_m_cpu_powerpc+set}" = set; then
6102 <  echo $ECHO_N "(cached) $ECHO_C" >&6
7267 > # Check whether --with-zlib was given.
7268 > if test "${with_zlib+set}" = set; then :
7269 >  withval=$with_zlib; zlib_dir="$withval"
7270   else
7271 <  echo 'void f(){}' > conftest.cpp
6105 < if test -z "`${CXX-c++} -mcpu=powerpc -c conftest.cpp 2>&1`"; then
6106 <        ac_m_cpu_powerpc=yes
6107 < else
6108 <        ac_m_cpu_powerpc=no
7271 >                zlib_dir="not_set"
7272   fi
6110 rm -f conftest*
7273  
7274 < fi
6113 < echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5
6114 < echo "${ECHO_T}$ac_m_cpu_powerpc" >&6
6115 < if test "$ac_m_cpu_powerpc" = yes; then
6116 <        :
6117 <        CPU_FLAGS=-mcpu=powerpc
6118 < else
6119 <        :
7274 > if test "$zlib_dir" != "no"; then
7275  
7276 + if test "$zlib_dir" != "not_set" ; then
7277 +  if test -d "$zlib_dir"
7278 +  then
7279 +    ZLIB_HOME="$zlib_dir"
7280 +  else
7281 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $zlib_dir does not exist, checking usual places" >&5
7282 + $as_echo "$as_me: WARNING: Sorry, $zlib_dir does not exist, checking usual places" >&2;}
7283 +        ZLIB_HOME=/usr/local
7284 +        if test ! -f "${ZLIB_HOME}/include/zlib.h"
7285 +        then
7286 +                ZLIB_HOME=/usr
7287 +        fi
7288 +  fi
7289   fi
7290 + #
7291 + # Locate zlib, if wanted
7292 + #
7293 + if test -n "${ZLIB_HOME}"
7294 + then
7295 +        ZLIB_OLD_LDFLAGS=$LDFLAGS
7296 +        ZLIB_OLD_CFLAGS=$CFLAGS
7297 +        LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
7298 +        CFLAGS="$CFLAGS -I${ZLIB_HOME}/include"
7299  
7300 <                fi
7301 <                if test -z "$CPU_FLAGS"; then
7300 >        ac_ext=c
7301 > ac_cpp='$CPP $CPPFLAGS'
7302 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7303 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7304 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
7305  
7306 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5
7307 + $as_echo_n "checking for inflateEnd in -lz... " >&6; }
7308 + if test "${ac_cv_lib_z_inflateEnd+set}" = set; then :
7309 +  $as_echo_n "(cached) " >&6
7310 + else
7311 +  ac_check_lib_save_LIBS=$LIBS
7312 + LIBS="-lz  $LIBS"
7313 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7314 + /* end confdefs.h.  */
7315  
7316 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts -mpowerpc" >&5
7317 < echo $ECHO_N "checking whether ${CXX-c++} accepts -mpowerpc... $ECHO_C" >&6
7318 < if test "${ac_m_powerpc+set}" = set; then
7319 <  echo $ECHO_N "(cached) $ECHO_C" >&6
7316 > /* Override any GCC internal prototype to avoid an error.
7317 >   Use char because int might match the return type of a GCC
7318 >   builtin and then its argument prototype would still apply.  */
7319 > #ifdef __cplusplus
7320 > extern "C"
7321 > #endif
7322 > char inflateEnd ();
7323 > #ifdef FC_DUMMY_MAIN
7324 > #ifndef FC_DUMMY_MAIN_EQ_F77
7325 > #  ifdef __cplusplus
7326 >     extern "C"
7327 > #  endif
7328 >   int FC_DUMMY_MAIN() { return 1; }
7329 > #endif
7330 > #endif
7331 > int
7332 > main ()
7333 > {
7334 > return inflateEnd ();
7335 >  ;
7336 >  return 0;
7337 > }
7338 > _ACEOF
7339 > if ac_fn_c_try_link "$LINENO"; then :
7340 >  ac_cv_lib_z_inflateEnd=yes
7341   else
7342 <  echo 'void f(){}' > conftest.cpp
6133 < if test -z "`${CXX-c++} -mpowerpc -c conftest.cpp 2>&1`"; then
6134 <        ac_m_powerpc=yes
6135 < else
6136 <        ac_m_powerpc=no
7342 >  ac_cv_lib_z_inflateEnd=no
7343   fi
7344 < rm -f conftest*
7345 <
7344 > rm -f core conftest.err conftest.$ac_objext \
7345 >    conftest$ac_exeext conftest.$ac_ext
7346 > LIBS=$ac_check_lib_save_LIBS
7347   fi
7348 < echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5
7349 < echo "${ECHO_T}$ac_m_powerpc" >&6
7350 < if test "$ac_m_powerpc" = yes; then
7351 <        :
6145 <        CPU_FLAGS=-mpowerpc
7348 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateEnd" >&5
7349 > $as_echo "$ac_cv_lib_z_inflateEnd" >&6; }
7350 > if test "x$ac_cv_lib_z_inflateEnd" = x""yes; then :
7351 >  zlib_cv_libz=yes
7352   else
7353 <        :
7353 >  zlib_cv_libz=no
7354 > fi
7355  
7356 +        ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
7357 + if test "x$ac_cv_header_zlib_h" = x""yes; then :
7358 +  zlib_cv_zlib_h=yes
7359 + else
7360 +  zlib_cv_zlib_h=no
7361   fi
7362  
6151                fi
6152          esac
6153  fi
7363  
7364 <  if test -n "$CPU_FLAGS"; then
7365 <        CXXFLAGS="$CXXFLAGS $CPU_FLAGS"
7366 <  fi
7364 >        ac_ext=c
7365 > ac_cpp='$CPP $CPPFLAGS'
7366 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7367 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7368 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
7369  
6159  if test -z "$CXXFLAGS"; then
6160        echo ""
6161        echo "**********************************************************"
6162        echo "* WARNING: Don't know the best CXXFLAGS for this system  *"
6163        echo "* Use  make CXXFLAGS=..., or edit the top level Makefile *"
6164        echo "* (otherwise, a default of CXXFLAGS=-O3 will be used)    *"
6165        echo "**********************************************************"
6166        echo ""
6167        CXXFLAGS="-O3"
6168  fi
7370  
7371 +        if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes"; then
7372  
7373 + $as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h
7374  
7375 < echo "$as_me:$LINENO: checking whether ${CXX-c++} accepts ${CXXFLAGS}" >&5
7376 < echo $ECHO_N "checking whether ${CXX-c++} accepts ${CXXFLAGS}... $ECHO_C" >&6
7377 < if test "${ac_guessed_cxxflags+set}" = set; then
7378 <  echo $ECHO_N "(cached) $ECHO_C" >&6
7375 >
7376 > $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
7377 >
7378 >                ZLIB_INC_DIR="${ZLIB_HOME}/include"
7379 >                ZLIB_LIB_DIR="${ZLIB_HOME}/lib"
7380 >                ZLIB="-lz"
7381 >        else
7382 >                { $as_echo "$as_me:${as_lineno-$LINENO}: checking zlib in ${ZLIB_HOME}" >&5
7383 > $as_echo_n "checking zlib in ${ZLIB_HOME}... " >&6; }
7384 >                ZLIB_INC_DIR=
7385 >                ZLIB_LIB_DIR=
7386 >                ZLIB=
7387 >                LDFLAGS="$ZLIB_OLD_LDFLAGS"
7388 >                CFLAGS="$ZLIB_OLD_CFLAGS"
7389 >                { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7390 > $as_echo "failed" >&6; }
7391 >                echo ""
7392 >                echo "*********************************************************"
7393 >                echo "* WARNING: Could not find a working zlib installation   *"
7394 >                echo "* If you need OpenMD to be able to deal with compressed *"
7395 >                echo "* trajectory dump files be sure to specify a valid zlib *"
7396 >                echo "* installation with --with-zlib=DIR                     *"
7397 >                echo "*                                                       *"
7398 >                echo "* OpenMD will still work without zlib installed.        *"
7399 >                echo "*********************************************************"
7400 >                echo ""
7401 >        fi
7402 >
7403 >
7404 >
7405 > fi
7406 > fi
7407 >
7408 > #
7409 > # Handle user hints
7410 > #
7411 >
7412 > # Check whether --with-fftw was given.
7413 > if test "${with_fftw+set}" = set; then :
7414 >  withval=$with_fftw; fftw_dir="$withval"
7415   else
7416 <  echo 'void f(){}' > conftest.cpp
6178 < if test -z "`${CXX-c++} ${CXXFLAGS} -c conftest.cpp 2>&1`"; then
6179 <        ac_guessed_cxxflags=yes
6180 < else
6181 <        ac_guessed_cxxflags=no
7416 >             fftw_dir="not_set"
7417   fi
6183 rm -f conftest*
7418  
7419 + if test "$fftw_dir" != "no"; then
7420 +  if test "$fftw_dir" != "not_set" ; then
7421 +    if test -d "$fftw_dir"; then
7422 +      FFTW_HOME="$fftw_dir"
7423 +    else
7424 +      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $fftw_dir does not exist, checking usual places" >&5
7425 + $as_echo "$as_me: WARNING: Sorry, $fftw_dir does not exist, checking usual places" >&2;}
7426 +      FFTW_HOME=/usr/local
7427 +      if test ! -f "${FFTW_HOME}/include/fftw3.h" -o -f "${FFTW_HOME}/include/fftw.h" -o  -f "${FFTW_HOME}/include/dfftw.h"; then
7428 +        FFTW_HOME=/usr
7429 +      fi
7430 +    fi
7431 +    #
7432 +    # Locate fftw, if wanted
7433 +    #
7434 +    if test -n "${FFTW_HOME}"; then
7435 +      FFTW_OLD_LDFLAGS=$LDFLAGS
7436 +      FFTW_OLD_CFLAGS=$CFLAGS
7437 +      LDFLAGS="$LDFLAGS -L${FFTW_HOME}/lib"
7438 +      CFLAGS="$CFLAGS -I${FFTW_HOME}/include"
7439 +
7440 +      ac_ext=c
7441 + ac_cpp='$CPP $CPPFLAGS'
7442 + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7443 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7444 + ac_compiler_gnu=$ac_cv_c_compiler_gnu
7445 +
7446 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_execute in -lfftw3" >&5
7447 + $as_echo_n "checking for fftw_execute in -lfftw3... " >&6; }
7448 + if test "${ac_cv_lib_fftw3_fftw_execute+set}" = set; then :
7449 +  $as_echo_n "(cached) " >&6
7450 + else
7451 +  ac_check_lib_save_LIBS=$LIBS
7452 + LIBS="-lfftw3  $LIBS"
7453 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7454 + /* end confdefs.h.  */
7455 +
7456 + /* Override any GCC internal prototype to avoid an error.
7457 +   Use char because int might match the return type of a GCC
7458 +   builtin and then its argument prototype would still apply.  */
7459 + #ifdef __cplusplus
7460 + extern "C"
7461 + #endif
7462 + char fftw_execute ();
7463 + #ifdef FC_DUMMY_MAIN
7464 + #ifndef FC_DUMMY_MAIN_EQ_F77
7465 + #  ifdef __cplusplus
7466 +     extern "C"
7467 + #  endif
7468 +   int FC_DUMMY_MAIN() { return 1; }
7469 + #endif
7470 + #endif
7471 + int
7472 + main ()
7473 + {
7474 + return fftw_execute ();
7475 +  ;
7476 +  return 0;
7477 + }
7478 + _ACEOF
7479 + if ac_fn_c_try_link "$LINENO"; then :
7480 +  ac_cv_lib_fftw3_fftw_execute=yes
7481 + else
7482 +  ac_cv_lib_fftw3_fftw_execute=no
7483   fi
7484 < echo "$as_me:$LINENO: result: $ac_guessed_cxxflags" >&5
7485 < echo "${ECHO_T}$ac_guessed_cxxflags" >&6
7486 < if test "$ac_guessed_cxxflags" = yes; then
7487 <        :
7484 > rm -f core conftest.err conftest.$ac_objext \
7485 >    conftest$ac_exeext conftest.$ac_ext
7486 > LIBS=$ac_check_lib_save_LIBS
7487 > fi
7488 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_execute" >&5
7489 > $as_echo "$ac_cv_lib_fftw3_fftw_execute" >&6; }
7490 > if test "x$ac_cv_lib_fftw3_fftw_execute" = x""yes; then :
7491 >  fftw_cv_libfftw3=yes
7492 > else
7493 >  fftw_cv_libfftw3=no
7494 > fi
7495  
7496 +      ac_fn_c_check_header_mongrel "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default"
7497 + if test "x$ac_cv_header_fftw3_h" = x""yes; then :
7498 +  fftw_cv_fftw3_h=yes
7499   else
7500 <        :
7500 >  fftw_cv_fftw3_h=no
7501 > fi
7502  
6194        echo ""
6195        echo "**********************************************************"
6196        echo "* WARNING: The guessed CXXFLAGS don't seem to work with  *"
6197        echo "* your compiler.                                         *"
6198        echo "* Use  make CXXFLAGS=..., or edit the top level Makefile *"
6199        echo "**********************************************************"
6200        echo ""
6201        CXXFLAGS=""
7503  
7504 +      if test "$fftw_cv_libfftw3" = "no" -o "$fftw_cv_fftw3_h" = "no"; then
7505 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwnd_one in -lfftw" >&5
7506 + $as_echo_n "checking for fftwnd_one in -lfftw... " >&6; }
7507 + if test "${ac_cv_lib_fftw_fftwnd_one+set}" = set; then :
7508 +  $as_echo_n "(cached) " >&6
7509 + else
7510 +  ac_check_lib_save_LIBS=$LIBS
7511 + LIBS="-lfftw  $LIBS"
7512 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7513 + /* end confdefs.h.  */
7514 +
7515 + /* Override any GCC internal prototype to avoid an error.
7516 +   Use char because int might match the return type of a GCC
7517 +   builtin and then its argument prototype would still apply.  */
7518 + #ifdef __cplusplus
7519 + extern "C"
7520 + #endif
7521 + char fftwnd_one ();
7522 + #ifdef FC_DUMMY_MAIN
7523 + #ifndef FC_DUMMY_MAIN_EQ_F77
7524 + #  ifdef __cplusplus
7525 +     extern "C"
7526 + #  endif
7527 +   int FC_DUMMY_MAIN() { return 1; }
7528 + #endif
7529 + #endif
7530 + int
7531 + main ()
7532 + {
7533 + return fftwnd_one ();
7534 +  ;
7535 +  return 0;
7536 + }
7537 + _ACEOF
7538 + if ac_fn_c_try_link "$LINENO"; then :
7539 +  ac_cv_lib_fftw_fftwnd_one=yes
7540 + else
7541 +  ac_cv_lib_fftw_fftwnd_one=no
7542   fi
7543 + rm -f core conftest.err conftest.$ac_objext \
7544 +    conftest$ac_exeext conftest.$ac_ext
7545 + LIBS=$ac_check_lib_save_LIBS
7546 + fi
7547 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw_fftwnd_one" >&5
7548 + $as_echo "$ac_cv_lib_fftw_fftwnd_one" >&6; }
7549 + if test "x$ac_cv_lib_fftw_fftwnd_one" = x""yes; then :
7550 +  fftw_cv_libfftw=yes
7551 + else
7552 +  fftw_cv_libfftw=no
7553 + fi
7554  
7555 +        ac_fn_c_check_header_mongrel "$LINENO" "fftw.h" "ac_cv_header_fftw_h" "$ac_includes_default"
7556 + if test "x$ac_cv_header_fftw_h" = x""yes; then :
7557 +  fftw_cv_fftw_h=yes
7558 + else
7559 +  fftw_cv_fftw_h=no
7560 + fi
7561  
7562 +
7563 +        if test "$fftw_cv_libfftw" = "no" -o "$fftw_cv_fftw_h" = "no"; then
7564 +          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwnd_one in -ldfftw" >&5
7565 + $as_echo_n "checking for fftwnd_one in -ldfftw... " >&6; }
7566 + if test "${ac_cv_lib_dfftw_fftwnd_one+set}" = set; then :
7567 +  $as_echo_n "(cached) " >&6
7568 + else
7569 +  ac_check_lib_save_LIBS=$LIBS
7570 + LIBS="-ldfftw  $LIBS"
7571 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7572 + /* end confdefs.h.  */
7573 +
7574 + /* Override any GCC internal prototype to avoid an error.
7575 +   Use char because int might match the return type of a GCC
7576 +   builtin and then its argument prototype would still apply.  */
7577 + #ifdef __cplusplus
7578 + extern "C"
7579 + #endif
7580 + char fftwnd_one ();
7581 + #ifdef FC_DUMMY_MAIN
7582 + #ifndef FC_DUMMY_MAIN_EQ_F77
7583 + #  ifdef __cplusplus
7584 +     extern "C"
7585 + #  endif
7586 +   int FC_DUMMY_MAIN() { return 1; }
7587 + #endif
7588 + #endif
7589 + int
7590 + main ()
7591 + {
7592 + return fftwnd_one ();
7593 +  ;
7594 +  return 0;
7595 + }
7596 + _ACEOF
7597 + if ac_fn_c_try_link "$LINENO"; then :
7598 +  ac_cv_lib_dfftw_fftwnd_one=yes
7599 + else
7600 +  ac_cv_lib_dfftw_fftwnd_one=no
7601   fi
7602 + rm -f core conftest.err conftest.$ac_objext \
7603 +    conftest$ac_exeext conftest.$ac_ext
7604 + LIBS=$ac_check_lib_save_LIBS
7605 + fi
7606 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dfftw_fftwnd_one" >&5
7607 + $as_echo "$ac_cv_lib_dfftw_fftwnd_one" >&6; }
7608 + if test "x$ac_cv_lib_dfftw_fftwnd_one" = x""yes; then :
7609 +  fftw_cv_libdfftw=yes
7610 + else
7611 +  fftw_cv_libdfftw=no
7612 + fi
7613  
7614 +          ac_fn_c_check_header_mongrel "$LINENO" "dfftw.h" "ac_cv_header_dfftw_h" "$ac_includes_default"
7615 + if test "x$ac_cv_header_dfftw_h" = x""yes; then :
7616 +  fftw_cv_dfftw_h=yes
7617 + else
7618 +  fftw_cv_dfftw_h=no
7619 + fi
7620  
7621  
7622 +        fi
7623 +      fi
7624 +      ac_ext=c
7625 + ac_cpp='$CPP $CPPFLAGS'
7626 + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7627 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7628 + ac_compiler_gnu=$ac_cv_c_compiler_gnu
7629  
7630 +      if test "$fftw_cv_libfftw3" = "yes" -a "$fftw_cv_fftw3_h" = "yes"; then
7631  
7632 < # Try to determine "good" native compiler flags if none specified on command
6213 < # line
7632 > $as_echo "#define HAVE_FFTW3_H 1" >>confdefs.h
7633  
7634 < if test x"$F90FLAGS" = x ; then
7635 <  F90FLAGS=""
7636 <  case "${host_cpu}-${host_os}" in
7634 >        FFTW_INC_DIR="${FFTW_HOME}/include"
7635 >        FFTW_LIB_DIR="${FFTW_HOME}/lib"
7636 >        FFTW_LIBS="-lfftw3"
7637 >      else
7638 >        if test "$fftw_cv_libfftw" = "yes" -a "$fftw_cv_fftw_h" = "yes"; then
7639  
7640 <  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
6220 <                    F90FLAGS="-O"
6221 <                fi;;
6222 <   rs6000*-aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
6223 <                    F90FLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w"
6224 <                fi;;
6225 <   powerpc*-aix*)
6226 <        if test "$F90" = f90 -o "$F90" = xlf90; then
6227 <                F90FLAGS="-O3 -qarch=ppc -qansialias -w"
6228 <                echo "*******************************************************"
6229 <                echo "*  You have AIX on an unknown powerpc system.  It is  *"
6230 <                echo "*  recommended that you use                           *"
6231 <                echo "*                                                     *"
6232 <                echo "*  F90FLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
6233 <                echo "*                                 ^^^                 *"
6234 <                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
6235 <                echo "*  PowerPC CPU you have.   For more info, man xlf.    *"
6236 <                echo "*******************************************************"
6237 <        fi;;
6238 <   *darwin*)
6239 <        if test "$F90" = f90 -o "$F90" = xlf90 -o "$F90" = xlf95; then
6240 <                F90FLAGS="-qthreaded -O5 -qtune=auto -qarch=auto -qunroll=auto"
6241 <        fi;;
6242 <  esac
7640 > $as_echo "#define HAVE_FFTW_H 1" >>confdefs.h
7641  
7642 <  if test -n "$CPU_FLAGS"; then
7643 <        F90FLAGS="$F90FLAGS $CPU_FLAGS"
7644 <  fi
7642 >          FFTW_INC_DIR="${FFTW_HOME}/include"
7643 >          FFTW_LIB_DIR="${FFTW_HOME}/lib"
7644 >          FFTW_LIBS="-lfftw"
7645 >        else
7646 >          if test "$fftw_cv_libdfftw" = "yes" -a "$fftw_cv_dfftw_h" = "yes"; then
7647  
7648 <  if test -z "$F90FLAGS"; then
7649 <        echo ""
7650 <        echo "**********************************************************"
7651 <        echo "* WARNING: Don't know the best F90FLAGS for this system  *"
7652 <        echo "* Use  make F90FLAGS=..., or edit the top level Makefile *"
7653 <        echo "* (otherwise, a default of F90FLAGS=-O3 will be used)    *"
7654 <        echo "**********************************************************"
7655 <        echo ""
7656 <        F90FLAGS="-O3"
7657 <  fi
7648 > $as_echo "#define HAVE_DFFTW_H 1" >>confdefs.h
7649 >
7650 >            FFTW_INC_DIR="${FFTW_HOME}/include"
7651 >            FFTW_LIB_DIR="${FFTW_HOME}/lib"
7652 >            FFTW_LIBS="-ldfftw"
7653 >          else
7654 >            { $as_echo "$as_me:${as_lineno-$LINENO}: checking fftw in ${FFTW_HOME}" >&5
7655 > $as_echo_n "checking fftw in ${FFTW_HOME}... " >&6; }
7656 >            FFTW_INC_DIR=
7657 >            FFTW_LIB_DIR=
7658 >            FFTW_LIBS=
7659 >            LDFLAGS="$FFTW_OLD_LDFLAGS"
7660 >            CFLAGS="$FFTW_OLD_CFLAGS"
7661 >            { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7662 > $as_echo "failed" >&6; }
7663 >            echo ""
7664 >            echo "*********************************************************"
7665 >            echo "* WARNING: Could not find a working FFTW installation   *"
7666 >            echo "* If you need the staticProps program to be able to     *"
7667 >            echo "* compute undulation spectra, be sure to specify a      *"
7668 >            echo "* valid fftw installation with --with-fftw=DIR          *"
7669 >            echo "*                                                       *"
7670 >            echo "* OpenMD will still work without fftw installed.        *"
7671 >            echo "*********************************************************"
7672 >            echo ""
7673 >          fi
7674 >        fi
7675 >      fi
7676  
7677  
6260 echo "$as_me:$LINENO: checking whether ${F90-f90} accepts ${F90FLAGS}" >&5
6261 echo $ECHO_N "checking whether ${F90-f90} accepts ${F90FLAGS}... $ECHO_C" >&6
6262 if test "${ac_guessed_f90flags+set}" = set; then
6263  echo $ECHO_N "(cached) $ECHO_C" >&6
6264 else
7678  
7679 +    fi
7680 +  fi
7681 + fi
7682  
7683 + #
7684 + # Handle user hints
7685 + #
7686  
7687 < ac_ext=f90
7688 < ac_compile='$F90 -c $F90FLAGS conftest.$ac_ext >&5'
7689 < ac_link='$F90 -o conftest$ac_exeext $F90FLAGS $LD90FLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6271 < ac_compiler_gnu=$ac_cv_f90_compiler_gnu
6272 <
6273 < echo 'program main' > conftest.$ac_ext
6274 < echo 'end program main' >> conftest.$ac_ext
6275 < ac_compile='${F90-f90} -c ${F90FLAGS} $F90FLAGS conftest.$ac_ext 1>&5'
6276 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6277 <  (eval $ac_compile) 2>&5
6278 <  ac_status=$?
6279 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6280 <  (exit $ac_status); }; then
6281 <        ac_guessed_f90flags=yes
7687 > # Check whether --with-qhull was given.
7688 > if test "${with_qhull+set}" = set; then :
7689 >  withval=$with_qhull; qhull_dir="$withval"
7690   else
7691 <        ac_guessed_f90flags=no
7691 >  qhull_dir="not_set"
7692   fi
7693 < rm -f conftest*
7694 < ac_ext=c
7693 >
7694 > QHULL_INC_DIR=
7695 > QHULL_LIB_DIR=
7696 > QHULL=
7697 > USE_QHULL=no
7698 >
7699 > if test "$qhull_dir" != "no"; then
7700 >   if test "$qhull_dir" != "not_set" ; then
7701 >     if test -d "$qhull_dir"; then
7702 >       QHULL_HOME="$qhull_dir"
7703 >     else
7704 >       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $qhull_dir does not exist, checking usual places" >&5
7705 > $as_echo "$as_me: WARNING: Sorry, $qhull_dir does not exist, checking usual places" >&2;}
7706 >       QHULL_HOME=/usr/local
7707 >       if test ! -f "${QHULL_HOME}/include/qhull/qhull.h"; then
7708 >          QHULL_HOME=/usr
7709 >       fi
7710 >     fi
7711 >   fi
7712 >   #
7713 >   # Locate qhull, if wanted
7714 >   #
7715 >   if test -n "${QHULL_HOME}"; then
7716 >        { $as_echo "$as_me:${as_lineno-$LINENO}: Checking for qhull in ${QHULL_HOME}" >&5
7717 > $as_echo "$as_me: Checking for qhull in ${QHULL_HOME}" >&6;}
7718 >
7719 >        ac_ext=c
7720   ac_cpp='$CPP $CPPFLAGS'
7721   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7722   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7723   ac_compiler_gnu=$ac_cv_c_compiler_gnu
7724  
7725 <
7726 < fi
7727 < echo "$as_me:$LINENO: result: $ac_guessed_f90flags" >&5
7728 < echo "${ECHO_T}$ac_guessed_f90flags" >&6
7729 < if test "$ac_guessed_f90flags" = yes; then
7730 <        :
7731 <
7725 >        QHULL_OLD_LDFLAGS=$LDFLAGS
7726 >        QHULL_OLD_CFLAGS=$CFLAGS
7727 >        QHULL_OLD_CPPFLAGS=$CPPFLAGS
7728 >        LDFLAGS="$LDFLAGS -L${QHULL_HOME}/lib"
7729 >        CFLAGS="$CFLAGS -I${QHULL_HOME}/include"
7730 >        CPPFLAGS="$CPPFLAGS -I${QHULL_HOME}/include"
7731 >        ac_fn_c_check_header_mongrel "$LINENO" "qhull/qhull.h" "ac_cv_header_qhull_qhull_h" "$ac_includes_default"
7732 > if test "x$ac_cv_header_qhull_qhull_h" = x""yes; then :
7733 >  qhull_cv_qhull_h=yes
7734   else
7735 <        :
6301 <
6302 <        echo ""
6303 <        echo "**********************************************************"
6304 <        echo "* WARNING: The guessed F90FLAGS don't seem to work with  *"
6305 <        echo "* your compiler.                                         *"
6306 <        echo "* Use  make F90FLAGS=..., or edit the top level Makefile *"
6307 <        echo "**********************************************************"
6308 <        echo ""
6309 <        F90FLAGS=""
6310 <
7735 >  qhull_cv_qhull_h=no
7736   fi
7737  
7738  
7739 < fi
7740 <
7741 <     ;;
7742 < esac
6318 <
6319 < # Find a good install program.  We prefer a C program (faster),
6320 < # so one script is as good as another.  But avoid the broken or
6321 < # incompatible versions:
6322 < # SysV /etc/install, /usr/sbin/install
6323 < # SunOS /usr/etc/install
6324 < # IRIX /sbin/install
6325 < # AIX /bin/install
6326 < # AmigaOS /C/install, which installs bootblocks on floppy discs
6327 < # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6328 < # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6329 < # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6330 < # OS/2's system install, which has a completely different semantic
6331 < # ./install, which can be erroneously created by make from ./install.sh.
6332 < echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
6333 < echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
6334 < if test -z "$INSTALL"; then
6335 < if test "${ac_cv_path_install+set}" = set; then
6336 <  echo $ECHO_N "(cached) $ECHO_C" >&6
7739 >        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for qh_qhull in -lqhull" >&5
7740 > $as_echo_n "checking for qh_qhull in -lqhull... " >&6; }
7741 > if test "${ac_cv_lib_qhull_qh_qhull+set}" = set; then :
7742 >  $as_echo_n "(cached) " >&6
7743   else
7744 <  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7745 < for as_dir in $PATH
7746 < do
7747 <  IFS=$as_save_IFS
6342 <  test -z "$as_dir" && as_dir=.
6343 <  # Account for people who put trailing slashes in PATH elements.
6344 < case $as_dir/ in
6345 <  ./ | .// | /cC/* | \
6346 <  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6347 <  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
6348 <  /usr/ucb/* ) ;;
6349 <  *)
6350 <    # OSF1 and SCO ODT 3.0 have their own names for install.
6351 <    # Don't use installbsd from OSF since it installs stuff as root
6352 <    # by default.
6353 <    for ac_prog in ginstall scoinst install; do
6354 <      for ac_exec_ext in '' $ac_executable_extensions; do
6355 <        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
6356 <          if test $ac_prog = install &&
6357 <            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6358 <            # AIX install.  It has an incompatible calling convention.
6359 <            :
6360 <          elif test $ac_prog = install &&
6361 <            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6362 <            # program-specific install script used by HP pwplus--don't use.
6363 <            :
6364 <          else
6365 <            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6366 <            break 3
6367 <          fi
6368 <        fi
6369 <      done
6370 <    done
6371 <    ;;
6372 < esac
6373 < done
7744 >  ac_check_lib_save_LIBS=$LIBS
7745 > LIBS="-lqhull  $LIBS"
7746 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7747 > /* end confdefs.h.  */
7748  
7749 <
7750 < fi
7751 <  if test "${ac_cv_path_install+set}" = set; then
7752 <    INSTALL=$ac_cv_path_install
7753 <  else
7754 <    # As a last resort, use the slow shell script.  We don't cache a
7755 <    # path for INSTALL within a source directory, because that will
7756 <    # break other packages using the cache if that directory is
7757 <    # removed, or if the path is relative.
7758 <    INSTALL=$ac_install_sh
7759 <  fi
7760 < fi
7761 < echo "$as_me:$LINENO: result: $INSTALL" >&5
7762 < echo "${ECHO_T}$INSTALL" >&6
7763 <
7764 < # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7765 < # It thinks the first close brace ends the variable substitution.
7766 < test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7767 <
7768 < test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7769 <
7770 < test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6397 <
6398 < echo "$as_me:$LINENO: checking whether ln -s works" >&5
6399 < echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
6400 < LN_S=$as_ln_s
6401 < if test "$LN_S" = "ln -s"; then
6402 <  echo "$as_me:$LINENO: result: yes" >&5
6403 < echo "${ECHO_T}yes" >&6
6404 < else
6405 <  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
6406 < echo "${ECHO_T}no, using $LN_S" >&6
6407 < fi
6408 <
6409 < echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6410 < echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
6411 < set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
6412 < if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
6413 <  echo $ECHO_N "(cached) $ECHO_C" >&6
6414 < else
6415 <  cat >conftest.make <<\_ACEOF
6416 < all:
6417 <        @echo 'ac_maketemp="$(MAKE)"'
7749 > /* Override any GCC internal prototype to avoid an error.
7750 >   Use char because int might match the return type of a GCC
7751 >   builtin and then its argument prototype would still apply.  */
7752 > #ifdef __cplusplus
7753 > extern "C"
7754 > #endif
7755 > char qh_qhull ();
7756 > #ifdef FC_DUMMY_MAIN
7757 > #ifndef FC_DUMMY_MAIN_EQ_F77
7758 > #  ifdef __cplusplus
7759 >     extern "C"
7760 > #  endif
7761 >   int FC_DUMMY_MAIN() { return 1; }
7762 > #endif
7763 > #endif
7764 > int
7765 > main ()
7766 > {
7767 > return qh_qhull ();
7768 >  ;
7769 >  return 0;
7770 > }
7771   _ACEOF
7772 < # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7773 < eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
6421 < if test -n "$ac_maketemp"; then
6422 <  eval ac_cv_prog_make_${ac_make}_set=yes
7772 > if ac_fn_c_try_link "$LINENO"; then :
7773 >  ac_cv_lib_qhull_qh_qhull=yes
7774   else
7775 <  eval ac_cv_prog_make_${ac_make}_set=no
7775 >  ac_cv_lib_qhull_qh_qhull=no
7776   fi
7777 < rm -f conftest.make
7777 > rm -f core conftest.err conftest.$ac_objext \
7778 >    conftest$ac_exeext conftest.$ac_ext
7779 > LIBS=$ac_check_lib_save_LIBS
7780   fi
7781 < if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
7782 <  echo "$as_me:$LINENO: result: yes" >&5
7783 < echo "${ECHO_T}yes" >&6
7784 <  SET_MAKE=
7781 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_qhull_qh_qhull" >&5
7782 > $as_echo "$ac_cv_lib_qhull_qh_qhull" >&6; }
7783 > if test "x$ac_cv_lib_qhull_qh_qhull" = x""yes; then :
7784 >  qhull_cv_libqhull=yes
7785   else
7786 <  echo "$as_me:$LINENO: result: no" >&5
6434 < echo "${ECHO_T}no" >&6
6435 <  SET_MAKE="MAKE=${MAKE-make}"
7786 >  qhull_cv_libqhull=no
7787   fi
7788  
7789 < if test -n "$ac_tool_prefix"; then
7790 <  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7791 < set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7792 < echo "$as_me:$LINENO: checking for $ac_word" >&5
7793 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7794 < if test "${ac_cv_prog_RANLIB+set}" = set; then
7795 <  echo $ECHO_N "(cached) $ECHO_C" >&6
7796 < else
6446 <  if test -n "$RANLIB"; then
6447 <  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6448 < else
6449 < as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450 < for as_dir in $PATH
6451 < do
6452 <  IFS=$as_save_IFS
6453 <  test -z "$as_dir" && as_dir=.
6454 <  for ac_exec_ext in '' $ac_executable_extensions; do
6455 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6456 <    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6457 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6458 <    break 2
6459 <  fi
6460 < done
6461 < done
7789 >        LDFLAGS="$QHULL_OLD_LDFLAGS"
7790 >        CFLAGS="$QHULL_OLD_CFLAGS"
7791 >        CPPFLAGS="$QHULL_OLD_CPPFLAGS"
7792 >        ac_ext=c
7793 > ac_cpp='$CPP $CPPFLAGS'
7794 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7795 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7796 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
7797  
6463 fi
6464 fi
6465 RANLIB=$ac_cv_prog_RANLIB
6466 if test -n "$RANLIB"; then
6467  echo "$as_me:$LINENO: result: $RANLIB" >&5
6468 echo "${ECHO_T}$RANLIB" >&6
6469 else
6470  echo "$as_me:$LINENO: result: no" >&5
6471 echo "${ECHO_T}no" >&6
6472 fi
7798  
7799 +        if test "$qhull_cv_libqhull" = "yes" -a "$qhull_cv_qhull_h" = "yes"; then
7800 +
7801 + $as_echo "#define HAVE_QHULL_H 1" >>confdefs.h
7802 +
7803 +
7804 + $as_echo "#define HAVE_QHULL 1" >>confdefs.h
7805 +
7806 +           USE_QHULL=yes
7807 +           QHULL_INC_DIR="${QHULL_HOME}/include"
7808 +           QHULL_LIB_DIR="${QHULL_HOME}/lib"
7809 +           QHULL="-lqhull"
7810 +           { $as_echo "$as_me:${as_lineno-$LINENO}: result: Working qhull found, will proceed." >&5
7811 + $as_echo "Working qhull found, will proceed." >&6; }
7812 +        else
7813 +           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5
7814 + $as_echo "$as_me: WARNING: " >&2;}
7815 +           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find a working qhull installation" >&5
7816 + $as_echo "$as_me: WARNING: Could not find a working qhull installation" >&2;}
7817 +           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If you need OpenMD to be able to deal with convex    " >&5
7818 + $as_echo "$as_me: WARNING: If you need OpenMD to be able to deal with convex    " >&2;}
7819 +           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: hulls be sure to specify a valid qhull installation " >&5
7820 + $as_echo "$as_me: WARNING: hulls be sure to specify a valid qhull installation " >&2;}
7821 +           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: with --with-qhull=DIR                               " >&5
7822 + $as_echo "$as_me: WARNING: with --with-qhull=DIR                               " >&2;}
7823 +           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5
7824 + $as_echo "$as_me: WARNING: " >&2;}
7825 +           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenMD will still work without qhull installed.      " >&5
7826 + $as_echo "$as_me: WARNING: OpenMD will still work without qhull installed.      " >&2;}
7827 +           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5
7828 + $as_echo "$as_me: WARNING: " >&2;}
7829 +        fi
7830 +    fi
7831   fi
7832 < if test -z "$ac_cv_prog_RANLIB"; then
7833 <  ac_ct_RANLIB=$RANLIB
7834 <  # Extract the first word of "ranlib", so it can be a program name with args.
7835 < set dummy ranlib; ac_word=$2
7836 < echo "$as_me:$LINENO: checking for $ac_word" >&5
7837 < echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7838 < if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7839 <  echo $ECHO_N "(cached) $ECHO_C" >&6
7832 >
7833 >
7834 >
7835 >
7836 >
7837 > ac_ext=cpp
7838 > ac_cpp='$CXXCPP $CPPFLAGS'
7839 > ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7840 > ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7841 > ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7842 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
7843 > $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
7844 > if test -z "$CXXCPP"; then
7845 >  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
7846 >  $as_echo_n "(cached) " >&6
7847   else
7848 <  if test -n "$ac_ct_RANLIB"; then
7849 <  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7850 < else
7851 < as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7852 < for as_dir in $PATH
7848 >      # Double quotes because CXXCPP needs to be expanded
7849 >    for CXXCPP in "$CXX -E" "/lib/cpp"
7850 >    do
7851 >      ac_preproc_ok=false
7852 > for ac_cxx_preproc_warn_flag in '' yes
7853   do
7854 <  IFS=$as_save_IFS
7855 <  test -z "$as_dir" && as_dir=.
7856 <  for ac_exec_ext in '' $ac_executable_extensions; do
7857 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7858 <    ac_cv_prog_ac_ct_RANLIB="ranlib"
7859 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7860 <    break 2
7861 <  fi
7862 < done
7863 < done
7854 >  # Use a header file that comes with gcc, so configuring glibc
7855 >  # with a fresh cross-compiler works.
7856 >  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7857 >  # <limits.h> exists even on freestanding compilers.
7858 >  # On the NeXT, cc -E runs the code through the compiler's parser,
7859 >  # not just through cpp. "Syntax error" is here to catch this case.
7860 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7861 > /* end confdefs.h.  */
7862 > #ifdef __STDC__
7863 > # include <limits.h>
7864 > #else
7865 > # include <assert.h>
7866 > #endif
7867 >                     Syntax error
7868 > _ACEOF
7869 > if ac_fn_cxx_try_cpp "$LINENO"; then :
7870  
6501  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
6502 fi
6503 fi
6504 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6505 if test -n "$ac_ct_RANLIB"; then
6506  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6507 echo "${ECHO_T}$ac_ct_RANLIB" >&6
7871   else
7872 <  echo "$as_me:$LINENO: result: no" >&5
7873 < echo "${ECHO_T}no" >&6
7872 >  # Broken: fails on valid input.
7873 > continue
7874   fi
7875 + rm -f conftest.err conftest.$ac_ext
7876  
7877 <  RANLIB=$ac_ct_RANLIB
7877 >  # OK, works on sane cases.  Now check whether nonexistent headers
7878 >  # can be detected and how.
7879 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7880 > /* end confdefs.h.  */
7881 > #include <ac_nonexistent.h>
7882 > _ACEOF
7883 > if ac_fn_cxx_try_cpp "$LINENO"; then :
7884 >  # Broken: success on invalid input.
7885 > continue
7886   else
7887 <  RANLIB="$ac_cv_prog_RANLIB"
7887 >  # Passes both tests.
7888 > ac_preproc_ok=:
7889 > break
7890   fi
7891 + rm -f conftest.err conftest.$ac_ext
7892  
6518 for ac_prog in 'bison -y' byacc
6519 do
6520  # Extract the first word of "$ac_prog", so it can be a program name with args.
6521 set dummy $ac_prog; ac_word=$2
6522 echo "$as_me:$LINENO: checking for $ac_word" >&5
6523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6524 if test "${ac_cv_prog_YACC+set}" = set; then
6525  echo $ECHO_N "(cached) $ECHO_C" >&6
6526 else
6527  if test -n "$YACC"; then
6528  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6529 else
6530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6531 for as_dir in $PATH
6532 do
6533  IFS=$as_save_IFS
6534  test -z "$as_dir" && as_dir=.
6535  for ac_exec_ext in '' $ac_executable_extensions; do
6536  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6537    ac_cv_prog_YACC="$ac_prog"
6538    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6539    break 2
6540  fi
7893   done
7894 < done
7894 > # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7895 > rm -f conftest.err conftest.$ac_ext
7896 > if $ac_preproc_ok; then :
7897 >  break
7898 > fi
7899  
7900 +    done
7901 +    ac_cv_prog_CXXCPP=$CXXCPP
7902 +
7903   fi
7904 +  CXXCPP=$ac_cv_prog_CXXCPP
7905 + else
7906 +  ac_cv_prog_CXXCPP=$CXXCPP
7907   fi
7908 < YACC=$ac_cv_prog_YACC
7909 < if test -n "$YACC"; then
7910 <  echo "$as_me:$LINENO: result: $YACC" >&5
7911 < echo "${ECHO_T}$YACC" >&6
7908 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
7909 > $as_echo "$CXXCPP" >&6; }
7910 > ac_preproc_ok=false
7911 > for ac_cxx_preproc_warn_flag in '' yes
7912 > do
7913 >  # Use a header file that comes with gcc, so configuring glibc
7914 >  # with a fresh cross-compiler works.
7915 >  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7916 >  # <limits.h> exists even on freestanding compilers.
7917 >  # On the NeXT, cc -E runs the code through the compiler's parser,
7918 >  # not just through cpp. "Syntax error" is here to catch this case.
7919 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7920 > /* end confdefs.h.  */
7921 > #ifdef __STDC__
7922 > # include <limits.h>
7923 > #else
7924 > # include <assert.h>
7925 > #endif
7926 >                     Syntax error
7927 > _ACEOF
7928 > if ac_fn_cxx_try_cpp "$LINENO"; then :
7929 >
7930   else
7931 <  echo "$as_me:$LINENO: result: no" >&5
7932 < echo "${ECHO_T}no" >&6
7931 >  # Broken: fails on valid input.
7932 > continue
7933   fi
7934 + rm -f conftest.err conftest.$ac_ext
7935  
7936 <  test -n "$YACC" && break
7936 >  # OK, works on sane cases.  Now check whether nonexistent headers
7937 >  # can be detected and how.
7938 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7939 > /* end confdefs.h.  */
7940 > #include <ac_nonexistent.h>
7941 > _ACEOF
7942 > if ac_fn_cxx_try_cpp "$LINENO"; then :
7943 >  # Broken: success on invalid input.
7944 > continue
7945 > else
7946 >  # Passes both tests.
7947 > ac_preproc_ok=:
7948 > break
7949 > fi
7950 > rm -f conftest.err conftest.$ac_ext
7951 >
7952   done
7953 < test -n "$YACC" || YACC="yacc"
7953 > # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7954 > rm -f conftest.err conftest.$ac_ext
7955 > if $ac_preproc_ok; then :
7956  
6559 for ac_prog in flex lex
6560 do
6561  # Extract the first word of "$ac_prog", so it can be a program name with args.
6562 set dummy $ac_prog; ac_word=$2
6563 echo "$as_me:$LINENO: checking for $ac_word" >&5
6564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6565 if test "${ac_cv_prog_LEX+set}" = set; then
6566  echo $ECHO_N "(cached) $ECHO_C" >&6
7957   else
7958 <  if test -n "$LEX"; then
7959 <  ac_cv_prog_LEX="$LEX" # Let the user override the test.
7960 < else
7961 < as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7962 < for as_dir in $PATH
6573 < do
6574 <  IFS=$as_save_IFS
6575 <  test -z "$as_dir" && as_dir=.
6576 <  for ac_exec_ext in '' $ac_executable_extensions; do
6577 <  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6578 <    ac_cv_prog_LEX="$ac_prog"
6579 <    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6580 <    break 2
6581 <  fi
6582 < done
6583 < done
7958 >  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7959 > $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7960 > as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
7961 > See \`config.log' for more details." "$LINENO" 5; }
7962 > fi
7963  
7964 + ac_ext=cpp
7965 + ac_cpp='$CXXCPP $CPPFLAGS'
7966 + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7967 + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7968 + ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7969 +
7970 +
7971 + #
7972 + # Handle user hints
7973 + #
7974 +
7975 + # Check whether --with-openbabel was given.
7976 + if test "${with_openbabel+set}" = set; then :
7977 +  withval=$with_openbabel; openbabel_dir="$withval"
7978 + else
7979 +                openbabel_dir="not_set"
7980   fi
7981 +
7982 + if test "$openbabel_dir" != "no"; then
7983 +
7984 + if test "$openbabel_dir" != "not_set" ; then
7985 +  if test -d "$openbabel_dir"
7986 +  then
7987 +    OPENBABEL_HOME="$openbabel_dir"
7988 +  else
7989 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, $openbabel_dir does not exist, checking usual places" >&5
7990 + $as_echo "$as_me: WARNING: Sorry, $openbabel_dir does not exist, checking usual places" >&2;}
7991 +        OPENBABEL_HOME=/usr/local
7992 +        if test ! -f "${OPENBABEL_HOME}/include/openbabel-2.0/openbabel/babelconfig.h" -a -f "${OPENBABEL_HOME}/include/openbabel-2.0/openbabel/obconversion.h"
7993 +        then
7994 +                OPENBABEL_HOME=/usr
7995 +        fi
7996 +  fi
7997   fi
7998 < LEX=$ac_cv_prog_LEX
7999 < if test -n "$LEX"; then
8000 <  echo "$as_me:$LINENO: result: $LEX" >&5
8001 < echo "${ECHO_T}$LEX" >&6
7998 > #
7999 > # Locate openbabel, if wanted
8000 > #
8001 > if test -n "${OPENBABEL_HOME}"
8002 > then
8003 >
8004 >        ac_ext=cpp
8005 > ac_cpp='$CXXCPP $CPPFLAGS'
8006 > ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8007 > ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8008 > ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8009 >
8010 >        OPENBABEL_OLD_LDFLAGS=$LDFLAGS
8011 >        OPENBABEL_OLD_CPPFLAGS=$CPPFLAGS
8012 >        LDFLAGS="$LDFLAGS -L${OPENBABEL_HOME}/lib -lopenbabel"
8013 >        CPPFLAGS="$CPPFLAGS -I${OPENBABEL_HOME}/include/openbabel-2.0"
8014 >        ac_fn_cxx_check_header_mongrel "$LINENO" "openbabel/babelconfig.h" "ac_cv_header_openbabel_babelconfig_h" "$ac_includes_default"
8015 > if test "x$ac_cv_header_openbabel_babelconfig_h" = x""yes; then :
8016 >  openbabel_cv_openbabel_h=yes
8017   else
8018 <  echo "$as_me:$LINENO: result: no" >&5
6593 < echo "${ECHO_T}no" >&6
8018 >  openbabel_cv_openbabel_h=no
8019   fi
8020  
6596  test -n "$LEX" && break
6597 done
6598 test -n "$LEX" || LEX=":"
8021  
8022 < if test -z "$LEXLIB"
8023 < then
8024 <  echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
6603 < echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
6604 < if test "${ac_cv_lib_fl_yywrap+set}" = set; then
6605 <  echo $ECHO_N "(cached) $ECHO_C" >&6
8022 >        ac_fn_cxx_check_header_mongrel "$LINENO" "openbabel/obconversion.h" "ac_cv_header_openbabel_obconversion_h" "$ac_includes_default"
8023 > if test "x$ac_cv_header_openbabel_obconversion_h" = x""yes; then :
8024 >  openbabel_cv_obconversion_h=yes
8025   else
8026 <  ac_check_lib_save_LIBS=$LIBS
8027 < LIBS="-lfl  $LIBS"
8028 < cat >conftest.$ac_ext <<_ACEOF
8029 < /* confdefs.h.  */
8030 < _ACEOF
6612 < cat confdefs.h >>conftest.$ac_ext
6613 < cat >>conftest.$ac_ext <<_ACEOF
8026 >  openbabel_cv_obconversion_h=no
8027 > fi
8028 >
8029 >
8030 >        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8031   /* end confdefs.h.  */
8032  
8033 < /* Override any gcc2 internal prototype to avoid an error.  */
8034 < #ifdef __cplusplus
8035 < extern "C"
8033 >
8034 > #include <openbabel/babelconfig.h>
8035 > #include <openbabel/obconversion.h>
8036 > using namespace std;
8037 > using namespace OpenBabel;
8038 >
8039 > #ifdef FC_DUMMY_MAIN
8040 > #ifndef FC_DUMMY_MAIN_EQ_F77
8041 > #  ifdef __cplusplus
8042 >     extern "C"
8043 > #  endif
8044 >   int FC_DUMMY_MAIN() { return 1; }
8045   #endif
8046 < /* We use char because int might match the return type of a gcc2
6621 <   builtin and then its argument prototype would still apply.  */
6622 < char yywrap ();
8046 > #endif
8047   int
8048   main ()
8049   {
8050 < yywrap ();
8050 >
8051 > OBConversion Conv(&cin, &cout);
8052 >
8053 >
8054    ;
8055    return 0;
8056   }
8057   _ACEOF
8058 < rm -f conftest.$ac_objext conftest$ac_exeext
8059 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8060 <  (eval $ac_link) 2>conftest.er1
8061 <  ac_status=$?
8062 <  grep -v '^ *+' conftest.er1 >conftest.err
8063 <  rm -f conftest.er1
6637 <  cat conftest.err >&5
6638 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6639 <  (exit $ac_status); } &&
6640 <         { ac_try='test -z "$ac_c_werror_flag"
6641 <                         || test ! -s conftest.err'
6642 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6643 <  (eval $ac_try) 2>&5
6644 <  ac_status=$?
6645 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6646 <  (exit $ac_status); }; } &&
6647 <         { ac_try='test -s conftest$ac_exeext'
6648 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6649 <  (eval $ac_try) 2>&5
6650 <  ac_status=$?
6651 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6652 <  (exit $ac_status); }; }; then
6653 <  ac_cv_lib_fl_yywrap=yes
8058 > if ac_fn_cxx_try_link "$LINENO"; then :
8059 >
8060 >                openbabel_lib_found="yes"
8061 >                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
8062 > $as_echo "found" >&6; }
8063 >
8064   else
6655  echo "$as_me: failed program was:" >&5
6656 sed 's/^/| /' conftest.$ac_ext >&5
8065  
8066 < ac_cv_lib_fl_yywrap=no
8066 >                openbabel_lib_found="no"
8067 >                { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8068 > $as_echo "not found" >&6; }
8069 >
8070 >
8071   fi
8072 < rm -f conftest.err conftest.$ac_objext \
8073 <      conftest$ac_exeext conftest.$ac_ext
8074 < LIBS=$ac_check_lib_save_LIBS
8072 > rm -f core conftest.err conftest.$ac_objext \
8073 >    conftest$ac_exeext conftest.$ac_ext
8074 >        ac_ext=c
8075 > ac_cpp='$CPP $CPPFLAGS'
8076 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8077 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8078 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
8079 >
8080 >        LDFLAGS="$OPENBABEL_OLD_LDFLAGS"
8081 >        CPPFLAGS="$OPENBABEL_OLD_CPPFLAGS"
8082 >
8083 >        if test "$openbabel_lib_found" = "yes" -a "$openbabel_cv_openbabel_h" = "yes" -a "$openbabel_cv_obconversion_h" = "yes"; then
8084 >                USE_OPENBABEL=yes
8085 >                OPENBABEL_INC_DIR="${OPENBABEL_HOME}/include/openbabel-2.0"
8086 >                OPENBABEL_LIB_DIR="${OPENBABEL_HOME}/lib"
8087 >                OPENBABEL_LIB="-lopenbabel"
8088 >        else
8089 >                { $as_echo "$as_me:${as_lineno-$LINENO}: checking openbabel in ${OPENBABEL_HOME}" >&5
8090 > $as_echo_n "checking openbabel in ${OPENBABEL_HOME}... " >&6; }
8091 >                OPENBABEL_INC_DIR=
8092 >                OPENBABEL_LIB_DIR=
8093 >                OPENBABEL_LIB=
8094 >                USE_OPENBABEL=no
8095 >                { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8096 > $as_echo "failed" >&6; }
8097 >                echo ""
8098 >                echo "*********************************************************"
8099 >                echo "* WARNING: Could not find a working openbabel-2.x       *"
8100 >                echo "* installation If you need OpenMD to be able to convert *"
8101 >                echo "* xyz or pdb files you need to specify a valid          *"
8102 >                echo "* openbabel-2.x installation with --with-openbabel=DIR  *"
8103 >                echo "*                                                       *"
8104 >                echo "* OpenMD will still work without openbabel installed.   *"
8105 >                echo "*********************************************************"
8106 >                echo ""
8107 >        fi
8108 >
8109 >
8110 >
8111 >
8112   fi
8113 < echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
8114 < echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
8115 < if test $ac_cv_lib_fl_yywrap = yes; then
8116 <  LEXLIB="-lfl"
8113 > fi
8114 >
8115 >
8116 > # Checks for header files.
8117 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8118 > $as_echo_n "checking for ANSI C header files... " >&6; }
8119 > if test "${ac_cv_header_stdc+set}" = set; then :
8120 >  $as_echo_n "(cached) " >&6
8121   else
8122 <  echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
6670 < echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
6671 < if test "${ac_cv_lib_l_yywrap+set}" = set; then
6672 <  echo $ECHO_N "(cached) $ECHO_C" >&6
6673 < else
6674 <  ac_check_lib_save_LIBS=$LIBS
6675 < LIBS="-ll  $LIBS"
6676 < cat >conftest.$ac_ext <<_ACEOF
6677 < /* confdefs.h.  */
6678 < _ACEOF
6679 < cat confdefs.h >>conftest.$ac_ext
6680 < cat >>conftest.$ac_ext <<_ACEOF
8122 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8123   /* end confdefs.h.  */
8124 + #include <stdlib.h>
8125 + #include <stdarg.h>
8126 + #include <string.h>
8127 + #include <float.h>
8128  
8129 < /* Override any gcc2 internal prototype to avoid an error.  */
8130 < #ifdef __cplusplus
8131 < extern "C"
8129 > #ifdef FC_DUMMY_MAIN
8130 > #ifndef FC_DUMMY_MAIN_EQ_F77
8131 > #  ifdef __cplusplus
8132 >     extern "C"
8133 > #  endif
8134 >   int FC_DUMMY_MAIN() { return 1; }
8135   #endif
8136 < /* We use char because int might match the return type of a gcc2
6688 <   builtin and then its argument prototype would still apply.  */
6689 < char yywrap ();
8136 > #endif
8137   int
8138   main ()
8139   {
8140 < yywrap ();
8140 >
8141    ;
8142    return 0;
8143   }
8144   _ACEOF
8145 < rm -f conftest.$ac_objext conftest$ac_exeext
8146 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6700 <  (eval $ac_link) 2>conftest.er1
6701 <  ac_status=$?
6702 <  grep -v '^ *+' conftest.er1 >conftest.err
6703 <  rm -f conftest.er1
6704 <  cat conftest.err >&5
6705 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6706 <  (exit $ac_status); } &&
6707 <         { ac_try='test -z "$ac_c_werror_flag"
6708 <                         || test ! -s conftest.err'
6709 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6710 <  (eval $ac_try) 2>&5
6711 <  ac_status=$?
6712 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6713 <  (exit $ac_status); }; } &&
6714 <         { ac_try='test -s conftest$ac_exeext'
6715 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6716 <  (eval $ac_try) 2>&5
6717 <  ac_status=$?
6718 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6719 <  (exit $ac_status); }; }; then
6720 <  ac_cv_lib_l_yywrap=yes
8145 > if ac_fn_c_try_compile "$LINENO"; then :
8146 >  ac_cv_header_stdc=yes
8147   else
8148 <  echo "$as_me: failed program was:" >&5
6723 < sed 's/^/| /' conftest.$ac_ext >&5
6724 <
6725 < ac_cv_lib_l_yywrap=no
8148 >  ac_cv_header_stdc=no
8149   fi
8150 < rm -f conftest.err conftest.$ac_objext \
6728 <      conftest$ac_exeext conftest.$ac_ext
6729 < LIBS=$ac_check_lib_save_LIBS
6730 < fi
6731 < echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
6732 < echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
6733 < if test $ac_cv_lib_l_yywrap = yes; then
6734 <  LEXLIB="-ll"
6735 < fi
8150 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8151  
8152 < fi
8152 > if test $ac_cv_header_stdc = yes; then
8153 >  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8154 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8155 > /* end confdefs.h.  */
8156 > #include <string.h>
8157  
6739 fi
6740
6741 if test "x$LEX" != "x:"; then
6742  echo "$as_me:$LINENO: checking lex output file root" >&5
6743 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
6744 if test "${ac_cv_prog_lex_root+set}" = set; then
6745  echo $ECHO_N "(cached) $ECHO_C" >&6
6746 else
6747  # The minimal lex program is just a single line: %%.  But some broken lexes
6748 # (Solaris, I think it was) want two %% lines, so accommodate them.
6749 cat >conftest.l <<_ACEOF
6750 %%
6751 %%
8158   _ACEOF
8159 < { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
8160 <  (eval $LEX conftest.l) 2>&5
6755 <  ac_status=$?
6756 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6757 <  (exit $ac_status); }
6758 < if test -f lex.yy.c; then
6759 <  ac_cv_prog_lex_root=lex.yy
6760 < elif test -f lexyy.c; then
6761 <  ac_cv_prog_lex_root=lexyy
6762 < else
6763 <  { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
6764 < echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
6765 <   { (exit 1); exit 1; }; }
6766 < fi
6767 < fi
6768 < echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
6769 < echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
6770 < rm -f conftest.l
6771 < LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
8159 > if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8160 >  $EGREP "memchr" >/dev/null 2>&1; then :
8161  
6773 echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
6774 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
6775 if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
6776  echo $ECHO_N "(cached) $ECHO_C" >&6
8162   else
8163 <  # POSIX says lex can declare yytext either as a pointer or an array; the
6779 < # default is implementation-dependent. Figure out which it is, since
6780 < # not all implementations provide the %pointer and %array declarations.
6781 < ac_cv_prog_lex_yytext_pointer=no
6782 < echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
6783 < ac_save_LIBS=$LIBS
6784 < LIBS="$LIBS $LEXLIB"
6785 < cat >conftest.$ac_ext <<_ACEOF
6786 < `cat $LEX_OUTPUT_ROOT.c`
6787 < _ACEOF
6788 < rm -f conftest.$ac_objext conftest$ac_exeext
6789 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6790 <  (eval $ac_link) 2>conftest.er1
6791 <  ac_status=$?
6792 <  grep -v '^ *+' conftest.er1 >conftest.err
6793 <  rm -f conftest.er1
6794 <  cat conftest.err >&5
6795 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6796 <  (exit $ac_status); } &&
6797 <         { ac_try='test -z "$ac_c_werror_flag"
6798 <                         || test ! -s conftest.err'
6799 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6800 <  (eval $ac_try) 2>&5
6801 <  ac_status=$?
6802 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6803 <  (exit $ac_status); }; } &&
6804 <         { ac_try='test -s conftest$ac_exeext'
6805 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6806 <  (eval $ac_try) 2>&5
6807 <  ac_status=$?
6808 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6809 <  (exit $ac_status); }; }; then
6810 <  ac_cv_prog_lex_yytext_pointer=yes
6811 < else
6812 <  echo "$as_me: failed program was:" >&5
6813 < sed 's/^/| /' conftest.$ac_ext >&5
6814 <
8163 >  ac_cv_header_stdc=no
8164   fi
8165 < rm -f conftest.err conftest.$ac_objext \
6817 <      conftest$ac_exeext conftest.$ac_ext
6818 < LIBS=$ac_save_LIBS
6819 < rm -f "${LEX_OUTPUT_ROOT}.c"
8165 > rm -f conftest*
8166  
8167   fi
6822 echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
6823 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
6824 if test $ac_cv_prog_lex_yytext_pointer = yes; then
8168  
8169 < cat >>confdefs.h <<\_ACEOF
8170 < #define YYTEXT_POINTER 1
8169 > if test $ac_cv_header_stdc = yes; then
8170 >  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8171 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8172 > /* end confdefs.h.  */
8173 > #include <stdlib.h>
8174 >
8175   _ACEOF
8176 + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8177 +  $EGREP "free" >/dev/null 2>&1; then :
8178  
8179 + else
8180 +  ac_cv_header_stdc=no
8181   fi
8182 + rm -f conftest*
8183  
8184   fi
6833 # Extract the first word of "ar", so it can be a program name with args.
6834 set dummy ar; ac_word=$2
6835 echo "$as_me:$LINENO: checking for $ac_word" >&5
6836 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6837 if test "${ac_cv_prog_AR+set}" = set; then
6838  echo $ECHO_N "(cached) $ECHO_C" >&6
6839 else
6840  if test -n "$AR"; then
6841  ac_cv_prog_AR="$AR" # Let the user override the test.
6842 else
6843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6844 for as_dir in $PATH
6845 do
6846  IFS=$as_save_IFS
6847  test -z "$as_dir" && as_dir=.
6848  for ac_exec_ext in '' $ac_executable_extensions; do
6849  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6850    ac_cv_prog_AR="ar"
6851    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6852    break 2
6853  fi
6854 done
6855 done
8185  
8186 <  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="NONE"
8187 < fi
8188 < fi
8189 < AR=$ac_cv_prog_AR
6861 < if test -n "$AR"; then
6862 <  echo "$as_me:$LINENO: result: $AR" >&5
6863 < echo "${ECHO_T}$AR" >&6
8186 > if test $ac_cv_header_stdc = yes; then
8187 >  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8188 >  if test "$cross_compiling" = yes; then :
8189 >  :
8190   else
8191 <  echo "$as_me:$LINENO: result: no" >&5
8192 < echo "${ECHO_T}no" >&6
8193 < fi
8191 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8192 > /* end confdefs.h.  */
8193 > #include <ctype.h>
8194 > #include <stdlib.h>
8195 > #if ((' ' & 0x0FF) == 0x020)
8196 > # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8197 > # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8198 > #else
8199 > # define ISLOWER(c) \
8200 >                   (('a' <= (c) && (c) <= 'i') \
8201 >                     || ('j' <= (c) && (c) <= 'r') \
8202 >                     || ('s' <= (c) && (c) <= 'z'))
8203 > # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8204 > #endif
8205  
8206 < if test "$AR" = "NONE"; then
8207 <  { { echo "$as_me:$LINENO: error: --> Can't find \`ar'!" >&5
8208 < echo "$as_me: error: --> Can't find \`ar'!" >&2;}
8209 <   { (exit 1); exit 1; }; }
8210 <  cat >confcache <<\_ACEOF
8211 < # This file is a shell script that caches the results of configure
8212 < # tests run on this system so they can be shared between configure
8213 < # scripts and configure runs, see configure's option --config-cache.
8214 < # It is not useful on other systems.  If it contains results you don't
8215 < # want to keep, you may remove or edit it.
8216 < #
6880 < # config.status only pays attention to the cache file if you give it
6881 < # the --recheck option to rerun configure.
6882 < #
6883 < # `ac_cv_env_foo' variables (set or unset) will be overridden when
6884 < # loading this file, other *unset* `ac_cv_foo' will be assigned the
6885 < # following values.
6886 <
8206 > #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8207 > int
8208 > main ()
8209 > {
8210 >  int i;
8211 >  for (i = 0; i < 256; i++)
8212 >    if (XOR (islower (i), ISLOWER (i))
8213 >        || toupper (i) != TOUPPER (i))
8214 >      return 2;
8215 >  return 0;
8216 > }
8217   _ACEOF
8218 + if ac_fn_c_try_run "$LINENO"; then :
8219  
8220 < # The following way of writing the cache mishandles newlines in values,
8221 < # but we know of no workaround that is simple, portable, and efficient.
6891 < # So, don't put newlines in cache variables' values.
6892 < # Ultrix sh set writes to stderr and can't be redirected directly,
6893 < # and sets the high bit in the cache file unless we assign to the vars.
6894 < {
6895 <  (set) 2>&1 |
6896 <    case `(ac_space=' '; set | grep ac_space) 2>&1` in
6897 <    *ac_space=\ *)
6898 <      # `set' does not quote correctly, so add quotes (double-quote
6899 <      # substitution turns \\\\ into \\, and sed turns \\ into \).
6900 <      sed -n \
6901 <        "s/'/'\\\\''/g;
6902 <          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
6903 <      ;;
6904 <    *)
6905 <      # `set' quotes correctly as required by POSIX, so do not add quotes.
6906 <      sed -n \
6907 <        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
6908 <      ;;
6909 <    esac;
6910 < } |
6911 <  sed '
6912 <     t clear
6913 <     : clear
6914 <     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
6915 <     t end
6916 <     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
6917 <     : end' >>confcache
6918 < if diff $cache_file confcache >/dev/null 2>&1; then :; else
6919 <  if test -w $cache_file; then
6920 <    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
6921 <    cat confcache >$cache_file
6922 <  else
6923 <    echo "not updating unwritable cache $cache_file"
6924 <  fi
8220 > else
8221 >  ac_cv_header_stdc=no
8222   fi
8223 < rm -f confcache
8224 <  exit 1
8223 > rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8224 >  conftest.$ac_objext conftest.beam conftest.$ac_ext
8225   fi
8226  
8227 <
8228 <
8229 < # Check whether --with-mpi or --without-mpi was given.
8230 < if test "${with_mpi+set}" = set; then
8231 <  withval="$with_mpi"
6935 <  with_mpi=$withval
6936 < else
6937 <  with_mpi="no"
6938 < fi;
8227 > fi
8228 > fi
8229 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8230 > $as_echo "$ac_cv_header_stdc" >&6; }
8231 > if test $ac_cv_header_stdc = yes; then
8232  
8233 < case "x$with_mpi" in
6941 <        xyes | "x")  USE_MPI=yes;;
6942 <        xno) USE_MPI=no ;;
6943 <        *) MPI="$with_mpi"; USE_MPI=yes ;;
6944 < esac
6945 < if test "$USE_MPI" = "yes" -a -z "$with_mpi"; then
6946 <        MPI="/usr/local"
6947 < fi
6948 < if test "$USE_MPI" = "yes"; then
8233 > $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8234  
6950
6951 # Set variables...
6952 MPI_LIB_DIR="$MPI/lib"
6953 MPI_INC_DIR="$MPI/include"
6954
6955
6956
6957 echo "$as_me:$LINENO: checking for mpi.h" >&5
6958 echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6
6959 have_mpi_h=0
6960 echo '#include <mpi.h>' > conftest.cc
6961 if test -z "`${CXX} -I${MPI_INC_DIR} -c conftest.cc 2>&1`"; then
6962        echo "$as_me:$LINENO: result: yes" >&5
6963 echo "${ECHO_T}yes" >&6
6964        have_mpi_h=1
6965 else
6966        echo "$as_me:$LINENO: result: no! Check MPI include paths" >&5
6967 echo "${ECHO_T}no! Check MPI include paths" >&6
6968        USE_MPI="no"
8235   fi
6970 rm -f conftest*
6971 if test "$have_mpi_h" = 1; then
8236  
8237 < cat >>confdefs.h <<\_ACEOF
8238 < #define HAVE_MPI_H 1
8237 > for ac_header in libintl.h limits.h machine/hal_sysinfo.h stdlib.h string.h strings.h sys/param.h sys/pstat.h sys/sysctl.h sys/sysinfo.h sys/sysmp.h sys/systemcfg.h sys/table.h sys/time.h unistd.h
8238 > do :
8239 >  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8240 > ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8241 > eval as_val=\$$as_ac_Header
8242 >   if test "x$as_val" = x""yes; then :
8243 >  cat >>confdefs.h <<_ACEOF
8244 > #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8245   _ACEOF
8246  
8247   fi
8248  
8249 < echo "$as_me:$LINENO: checking whether mpif.h is usable" >&5
6980 < echo $ECHO_N "checking whether mpif.h is usable... $ECHO_C" >&6
6981 < have_mpif_h=0
6982 < rm -f conftest*
6983 < cat >conftest.f90 <<EOF
6984 < program main
6985 <   include 'mpif.h'
6986 < end
6987 < EOF
6988 < if $F90 -I$MPI_INC_DIR -c conftest.f90 > conftest.out 2>&1 ; then
6989 <        echo "$as_me:$LINENO: result: yes" >&5
6990 < echo "${ECHO_T}yes" >&6
6991 <        MPI_F90_INC="$MPI_INC_DIR"
6992 <        have_mpif_h=1
6993 < else
6994 <        if test -s conftest.out ; then
6995 <                cat conftest.out >> config.log
6996 <        fi
6997 <        echo "$as_me:$LINENO: result: no! Check MPI include paths" >&5
6998 < echo "${ECHO_T}no! Check MPI include paths" >&6
6999 <        USE_MPI="no"
7000 < fi
7001 < rm -f conftest*
8249 > done
8250  
7003 if test "$have_mpif_h" = 1; then
8251  
8252 < cat >>confdefs.h <<\_ACEOF
8253 < #define HAVE_MPIF_H 1
8254 < _ACEOF
8252 > # Checks for typedefs, structures, and compiler characteristics.
8253 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
8254 > $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
8255 > if test "${ac_cv_header_stdbool_h+set}" = set; then :
8256 >  $as_echo_n "(cached) " >&6
8257 > else
8258 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8259 > /* end confdefs.h.  */
8260  
8261 < fi
8261 > #include <stdbool.h>
8262 > #ifndef bool
8263 > "error: bool is not defined"
8264 > #endif
8265 > #ifndef false
8266 > "error: false is not defined"
8267 > #endif
8268 > #if false
8269 > "error: false is not 0"
8270 > #endif
8271 > #ifndef true
8272 > "error: true is not defined"
8273 > #endif
8274 > #if true != 1
8275 > "error: true is not 1"
8276 > #endif
8277 > #ifndef __bool_true_false_are_defined
8278 > "error: __bool_true_false_are_defined is not defined"
8279 > #endif
8280  
8281 < ac_ext=c
7012 < ac_cpp='$CPP $CPPFLAGS'
7013 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7014 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7015 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
8281 >        struct s { _Bool s: 1; _Bool t; } s;
8282  
8283 < ac_save_LDFLAGS=$LDFLAGS
8284 < LDFLAGS="${LDFLAGS} -L${MPI_LIB_DIR} "
8283 >        char a[true == 1 ? 1 : -1];
8284 >        char b[false == 0 ? 1 : -1];
8285 >        char c[__bool_true_false_are_defined == 1 ? 1 : -1];
8286 >        char d[(bool) 0.5 == true ? 1 : -1];
8287 >        bool e = &s;
8288 >        char f[(_Bool) 0.0 == false ? 1 : -1];
8289 >        char g[true];
8290 >        char h[sizeof (_Bool)];
8291 >        char i[sizeof s.t];
8292 >        enum { j = false, k = true, l = false * true, m = true * 256 };
8293 >        /* The following fails for
8294 >           HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
8295 >        _Bool n[m];
8296 >        char o[sizeof n == m * sizeof n[0] ? 1 : -1];
8297 >        char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
8298 > #       if defined __xlc__ || defined __GNUC__
8299 >         /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
8300 >            reported by James Lemley on 2005-10-05; see
8301 >            http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
8302 >            This test is not quite right, since xlc is allowed to
8303 >            reject this program, as the initializer for xlcbug is
8304 >            not one of the forms that C requires support for.
8305 >            However, doing the test right would require a runtime
8306 >            test, and that would make cross-compilation harder.
8307 >            Let us hope that IBM fixes the xlc bug, and also adds
8308 >            support for this kind of constant expression.  In the
8309 >            meantime, this test will reject xlc, which is OK, since
8310 >            our stdbool.h substitute should suffice.  We also test
8311 >            this with GCC, where it should work, to detect more
8312 >            quickly whether someone messes up the test in the
8313 >            future.  */
8314 >         char digs[] = "0123456789";
8315 >         int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
8316 > #       endif
8317 >        /* Catch a bug in an HP-UX C compiler.  See
8318 >           http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
8319 >           http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
8320 >         */
8321 >        _Bool q = true;
8322 >        _Bool *pq = &q;
8323  
8324 < if test x = x"$MPI_LIB"; then
8325 <        echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
8326 < echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
8327 < if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
8328 <  echo $ECHO_N "(cached) $ECHO_C" >&6
8329 < else
7026 <  ac_check_lib_save_LIBS=$LIBS
7027 < LIBS="-lmpich  $LIBS"
7028 < cat >conftest.$ac_ext <<_ACEOF
7029 < /* confdefs.h.  */
7030 < _ACEOF
7031 < cat confdefs.h >>conftest.$ac_ext
7032 < cat >>conftest.$ac_ext <<_ACEOF
7033 < /* end confdefs.h.  */
7034 <
7035 < /* Override any gcc2 internal prototype to avoid an error.  */
7036 < #ifdef __cplusplus
7037 < extern "C"
8324 > #ifdef FC_DUMMY_MAIN
8325 > #ifndef FC_DUMMY_MAIN_EQ_F77
8326 > #  ifdef __cplusplus
8327 >     extern "C"
8328 > #  endif
8329 >   int FC_DUMMY_MAIN() { return 1; }
8330   #endif
8331 < /* We use char because int might match the return type of a gcc2
7040 <   builtin and then its argument prototype would still apply.  */
7041 < char MPI_Init ();
8331 > #endif
8332   int
8333   main ()
8334   {
8335 < MPI_Init ();
8335 >
8336 >        *pq |= q;
8337 >        *pq |= ! q;
8338 >        /* Refer to every declared value, to avoid compiler optimizations.  */
8339 >        return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
8340 >                + !m + !n + !o + !p + !q + !pq);
8341 >
8342    ;
8343    return 0;
8344   }
8345   _ACEOF
8346 < rm -f conftest.$ac_objext conftest$ac_exeext
8347 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7052 <  (eval $ac_link) 2>conftest.er1
7053 <  ac_status=$?
7054 <  grep -v '^ *+' conftest.er1 >conftest.err
7055 <  rm -f conftest.er1
7056 <  cat conftest.err >&5
7057 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7058 <  (exit $ac_status); } &&
7059 <         { ac_try='test -z "$ac_c_werror_flag"
7060 <                         || test ! -s conftest.err'
7061 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7062 <  (eval $ac_try) 2>&5
7063 <  ac_status=$?
7064 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7065 <  (exit $ac_status); }; } &&
7066 <         { ac_try='test -s conftest$ac_exeext'
7067 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7068 <  (eval $ac_try) 2>&5
7069 <  ac_status=$?
7070 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7071 <  (exit $ac_status); }; }; then
7072 <  ac_cv_lib_mpich_MPI_Init=yes
8346 > if ac_fn_c_try_compile "$LINENO"; then :
8347 >  ac_cv_header_stdbool_h=yes
8348   else
8349 <  echo "$as_me: failed program was:" >&5
7075 < sed 's/^/| /' conftest.$ac_ext >&5
7076 <
7077 < ac_cv_lib_mpich_MPI_Init=no
8349 >  ac_cv_header_stdbool_h=no
8350   fi
8351 < rm -f conftest.err conftest.$ac_objext \
7080 <      conftest$ac_exeext conftest.$ac_ext
7081 < LIBS=$ac_check_lib_save_LIBS
8351 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8352   fi
8353 < echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
8354 < echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
8355 < if test $ac_cv_lib_mpich_MPI_Init = yes; then
8356 <  MPI_LIB="-lmpich"
8353 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
8354 > $as_echo "$ac_cv_header_stdbool_h" >&6; }
8355 > ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
8356 > if test "x$ac_cv_type__Bool" = x""yes; then :
8357 >
8358 > cat >>confdefs.h <<_ACEOF
8359 > #define HAVE__BOOL 1
8360 > _ACEOF
8361 >
8362 >
8363   fi
8364  
8365 + if test $ac_cv_header_stdbool_h = yes; then
8366 +
8367 + $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
8368 +
8369   fi
8370 < if test x = x"$MPI_LIB"; then
8371 <        echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
8372 < echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
8373 < if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
8374 <  echo $ECHO_N "(cached) $ECHO_C" >&6
8370 >
8371 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
8372 > $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
8373 > if test "${ac_cv_c_const+set}" = set; then :
8374 >  $as_echo_n "(cached) " >&6
8375   else
8376 <  ac_check_lib_save_LIBS=$LIBS
7097 < LIBS="-lmpi  $LIBS"
7098 < cat >conftest.$ac_ext <<_ACEOF
7099 < /* confdefs.h.  */
7100 < _ACEOF
7101 < cat confdefs.h >>conftest.$ac_ext
7102 < cat >>conftest.$ac_ext <<_ACEOF
8376 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8377   /* end confdefs.h.  */
8378  
8379 < /* Override any gcc2 internal prototype to avoid an error.  */
8380 < #ifdef __cplusplus
8381 < extern "C"
8379 > #ifdef FC_DUMMY_MAIN
8380 > #ifndef FC_DUMMY_MAIN_EQ_F77
8381 > #  ifdef __cplusplus
8382 >     extern "C"
8383 > #  endif
8384 >   int FC_DUMMY_MAIN() { return 1; }
8385   #endif
8386 < /* We use char because int might match the return type of a gcc2
7110 <   builtin and then its argument prototype would still apply.  */
7111 < char MPI_Init ();
8386 > #endif
8387   int
8388   main ()
8389   {
8390 < MPI_Init ();
8390 > /* FIXME: Include the comments suggested by Paul. */
8391 > #ifndef __cplusplus
8392 >  /* Ultrix mips cc rejects this.  */
8393 >  typedef int charset[2];
8394 >  const charset cs;
8395 >  /* SunOS 4.1.1 cc rejects this.  */
8396 >  char const *const *pcpcc;
8397 >  char **ppc;
8398 >  /* NEC SVR4.0.2 mips cc rejects this.  */
8399 >  struct point {int x, y;};
8400 >  static struct point const zero = {0,0};
8401 >  /* AIX XL C 1.02.0.0 rejects this.
8402 >     It does not let you subtract one const X* pointer from another in
8403 >     an arm of an if-expression whose if-part is not a constant
8404 >     expression */
8405 >  const char *g = "string";
8406 >  pcpcc = &g + (g ? g-g : 0);
8407 >  /* HPUX 7.0 cc rejects these. */
8408 >  ++pcpcc;
8409 >  ppc = (char**) pcpcc;
8410 >  pcpcc = (char const *const *) ppc;
8411 >  { /* SCO 3.2v4 cc rejects this.  */
8412 >    char *t;
8413 >    char const *s = 0 ? (char *) 0 : (char const *) 0;
8414 >
8415 >    *t++ = 0;
8416 >    if (s) return 0;
8417 >  }
8418 >  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8419 >    int x[] = {25, 17};
8420 >    const int *foo = &x[0];
8421 >    ++foo;
8422 >  }
8423 >  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8424 >    typedef const int *iptr;
8425 >    iptr p = 0;
8426 >    ++p;
8427 >  }
8428 >  { /* AIX XL C 1.02.0.0 rejects this saying
8429 >       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8430 >    struct s { int j; const int *ap[3]; };
8431 >    struct s *b; b->j = 5;
8432 >  }
8433 >  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8434 >    const int foo = 10;
8435 >    if (!foo) return 0;
8436 >  }
8437 >  return !cs[0] && !zero.x;
8438 > #endif
8439 >
8440    ;
8441    return 0;
8442   }
8443   _ACEOF
8444 < rm -f conftest.$ac_objext conftest$ac_exeext
8445 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7122 <  (eval $ac_link) 2>conftest.er1
7123 <  ac_status=$?
7124 <  grep -v '^ *+' conftest.er1 >conftest.err
7125 <  rm -f conftest.er1
7126 <  cat conftest.err >&5
7127 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7128 <  (exit $ac_status); } &&
7129 <         { ac_try='test -z "$ac_c_werror_flag"
7130 <                         || test ! -s conftest.err'
7131 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7132 <  (eval $ac_try) 2>&5
7133 <  ac_status=$?
7134 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7135 <  (exit $ac_status); }; } &&
7136 <         { ac_try='test -s conftest$ac_exeext'
7137 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7138 <  (eval $ac_try) 2>&5
7139 <  ac_status=$?
7140 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7141 <  (exit $ac_status); }; }; then
7142 <  ac_cv_lib_mpi_MPI_Init=yes
8444 > if ac_fn_c_try_compile "$LINENO"; then :
8445 >  ac_cv_c_const=yes
8446   else
8447 <  echo "$as_me: failed program was:" >&5
7145 < sed 's/^/| /' conftest.$ac_ext >&5
7146 <
7147 < ac_cv_lib_mpi_MPI_Init=no
8447 >  ac_cv_c_const=no
8448   fi
8449 < rm -f conftest.err conftest.$ac_objext \
7150 <      conftest$ac_exeext conftest.$ac_ext
7151 < LIBS=$ac_check_lib_save_LIBS
8449 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8450   fi
8451 < echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
8452 < echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
8453 < if test $ac_cv_lib_mpi_MPI_Init = yes; then
8454 <  MPI_LIB="-lmpi"
8451 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
8452 > $as_echo "$ac_cv_c_const" >&6; }
8453 > if test $ac_cv_c_const = no; then
8454 >
8455 > $as_echo "#define const /**/" >>confdefs.h
8456 >
8457   fi
8458  
8459 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
8460 + $as_echo_n "checking for inline... " >&6; }
8461 + if test "${ac_cv_c_inline+set}" = set; then :
8462 +  $as_echo_n "(cached) " >&6
8463 + else
8464 +  ac_cv_c_inline=no
8465 + for ac_kw in inline __inline__ __inline; do
8466 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8467 + /* end confdefs.h.  */
8468 + #ifndef __cplusplus
8469 + typedef int foo_t;
8470 + static $ac_kw foo_t static_foo () {return 0; }
8471 + $ac_kw foo_t foo () {return 0; }
8472 + #endif
8473 +
8474 + _ACEOF
8475 + if ac_fn_c_try_compile "$LINENO"; then :
8476 +  ac_cv_c_inline=$ac_kw
8477   fi
8478 < $as_unset ac_cv_lib_mpi_MPI_Init
8479 < if test x = x"$MPI_LIB"; then
8480 <        echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
8481 < echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
8482 < if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
8483 <  echo $ECHO_N "(cached) $ECHO_C" >&6
8478 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8479 >  test "$ac_cv_c_inline" != no && break
8480 > done
8481 >
8482 > fi
8483 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
8484 > $as_echo "$ac_cv_c_inline" >&6; }
8485 >
8486 > case $ac_cv_c_inline in
8487 >  inline | yes) ;;
8488 >  *)
8489 >    case $ac_cv_c_inline in
8490 >      no) ac_val=;;
8491 >      *) ac_val=$ac_cv_c_inline;;
8492 >    esac
8493 >    cat >>confdefs.h <<_ACEOF
8494 > #ifndef __cplusplus
8495 > #define inline $ac_val
8496 > #endif
8497 > _ACEOF
8498 >    ;;
8499 > esac
8500 >
8501 > ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
8502 > if test "x$ac_cv_type_size_t" = x""yes; then :
8503 >
8504   else
8505 <  ac_check_lib_save_LIBS=$LIBS
8506 < LIBS="-lmpi "-llam" $LIBS"
8507 < cat >conftest.$ac_ext <<_ACEOF
7170 < /* confdefs.h.  */
8505 >
8506 > cat >>confdefs.h <<_ACEOF
8507 > #define size_t unsigned int
8508   _ACEOF
8509 < cat confdefs.h >>conftest.$ac_ext
8510 < cat >>conftest.$ac_ext <<_ACEOF
8509 >
8510 > fi
8511 >
8512 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8513 > $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8514 > if test "${ac_cv_header_time+set}" = set; then :
8515 >  $as_echo_n "(cached) " >&6
8516 > else
8517 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8518   /* end confdefs.h.  */
8519 + #include <sys/types.h>
8520 + #include <sys/time.h>
8521 + #include <time.h>
8522  
8523 < /* Override any gcc2 internal prototype to avoid an error.  */
8524 < #ifdef __cplusplus
8525 < extern "C"
8523 > #ifdef FC_DUMMY_MAIN
8524 > #ifndef FC_DUMMY_MAIN_EQ_F77
8525 > #  ifdef __cplusplus
8526 >     extern "C"
8527 > #  endif
8528 >   int FC_DUMMY_MAIN() { return 1; }
8529   #endif
8530 < /* We use char because int might match the return type of a gcc2
7181 <   builtin and then its argument prototype would still apply.  */
7182 < char MPI_Init ();
8530 > #endif
8531   int
8532   main ()
8533   {
8534 < MPI_Init ();
8534 > if ((struct tm *) 0)
8535 > return 0;
8536    ;
8537    return 0;
8538   }
8539   _ACEOF
8540 < rm -f conftest.$ac_objext conftest$ac_exeext
8541 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7193 <  (eval $ac_link) 2>conftest.er1
7194 <  ac_status=$?
7195 <  grep -v '^ *+' conftest.er1 >conftest.err
7196 <  rm -f conftest.er1
7197 <  cat conftest.err >&5
7198 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7199 <  (exit $ac_status); } &&
7200 <         { ac_try='test -z "$ac_c_werror_flag"
7201 <                         || test ! -s conftest.err'
7202 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7203 <  (eval $ac_try) 2>&5
7204 <  ac_status=$?
7205 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7206 <  (exit $ac_status); }; } &&
7207 <         { ac_try='test -s conftest$ac_exeext'
7208 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7209 <  (eval $ac_try) 2>&5
7210 <  ac_status=$?
7211 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7212 <  (exit $ac_status); }; }; then
7213 <  ac_cv_lib_mpi_MPI_Init=yes
8540 > if ac_fn_c_try_compile "$LINENO"; then :
8541 >  ac_cv_header_time=yes
8542   else
8543 <  echo "$as_me: failed program was:" >&5
7216 < sed 's/^/| /' conftest.$ac_ext >&5
7217 <
7218 < ac_cv_lib_mpi_MPI_Init=no
8543 >  ac_cv_header_time=no
8544   fi
8545 < rm -f conftest.err conftest.$ac_objext \
7221 <      conftest$ac_exeext conftest.$ac_ext
7222 < LIBS=$ac_check_lib_save_LIBS
8545 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8546   fi
8547 < echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
8548 < echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
8549 < if test $ac_cv_lib_mpi_MPI_Init = yes; then
8550 <  MPI_LIB="-lmpi -llam"
8547 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8548 > $as_echo "$ac_cv_header_time" >&6; }
8549 > if test $ac_cv_header_time = yes; then
8550 >
8551 > $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8552 >
8553   fi
8554  
8555 +
8556 + # Checks for library functions.
8557 + for ac_header in stdlib.h
8558 + do :
8559 +  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
8560 + if test "x$ac_cv_header_stdlib_h" = x""yes; then :
8561 +  cat >>confdefs.h <<_ACEOF
8562 + #define HAVE_STDLIB_H 1
8563 + _ACEOF
8564 +
8565   fi
8566  
8567 < $as_unset ac_cv_lib_mpi_MPI_Init
8568 < if test x = x"$MPI_LIB"; then
8569 < echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
8570 < echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
8571 < if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
8572 <  echo $ECHO_N "(cached) $ECHO_C" >&6
8567 > done
8568 >
8569 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
8570 > $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
8571 > if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
8572 >  $as_echo_n "(cached) " >&6
8573   else
8574 <  ac_check_lib_save_LIBS=$LIBS
8575 < LIBS="-lmpi -llam -lpthread $LIBS"
8576 < cat >conftest.$ac_ext <<_ACEOF
8577 < /* confdefs.h.  */
7243 < _ACEOF
7244 < cat confdefs.h >>conftest.$ac_ext
7245 < cat >>conftest.$ac_ext <<_ACEOF
8574 >  if test "$cross_compiling" = yes; then :
8575 >  ac_cv_func_malloc_0_nonnull=no
8576 > else
8577 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8578   /* end confdefs.h.  */
8579 + #if defined STDC_HEADERS || defined HAVE_STDLIB_H
8580 + # include <stdlib.h>
8581 + #else
8582 + char *malloc ();
8583 + #endif
8584  
8585 < /* Override any gcc2 internal prototype to avoid an error.  */
8586 < #ifdef __cplusplus
8587 < extern "C"
8585 > #ifdef FC_DUMMY_MAIN
8586 > #ifndef FC_DUMMY_MAIN_EQ_F77
8587 > #  ifdef __cplusplus
8588 >     extern "C"
8589 > #  endif
8590 >   int FC_DUMMY_MAIN() { return 1; }
8591   #endif
8592 < /* We use char because int might match the return type of a gcc2
7253 <   builtin and then its argument prototype would still apply.  */
7254 < char MPI_Init ();
8592 > #endif
8593   int
8594   main ()
8595   {
8596 < MPI_Init ();
8596 > return ! malloc (0);
8597    ;
8598    return 0;
8599   }
8600   _ACEOF
8601 < rm -f conftest.$ac_objext conftest$ac_exeext
8602 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7265 <  (eval $ac_link) 2>conftest.er1
7266 <  ac_status=$?
7267 <  grep -v '^ *+' conftest.er1 >conftest.err
7268 <  rm -f conftest.er1
7269 <  cat conftest.err >&5
7270 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7271 <  (exit $ac_status); } &&
7272 <         { ac_try='test -z "$ac_c_werror_flag"
7273 <                         || test ! -s conftest.err'
7274 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7275 <  (eval $ac_try) 2>&5
7276 <  ac_status=$?
7277 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7278 <  (exit $ac_status); }; } &&
7279 <         { ac_try='test -s conftest$ac_exeext'
7280 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7281 <  (eval $ac_try) 2>&5
7282 <  ac_status=$?
7283 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7284 <  (exit $ac_status); }; }; then
7285 <  ac_cv_lib_mpi_MPI_Init=yes
8601 > if ac_fn_c_try_run "$LINENO"; then :
8602 >  ac_cv_func_malloc_0_nonnull=yes
8603   else
8604 <  echo "$as_me: failed program was:" >&5
7288 < sed 's/^/| /' conftest.$ac_ext >&5
7289 <
7290 < ac_cv_lib_mpi_MPI_Init=no
8604 >  ac_cv_func_malloc_0_nonnull=no
8605   fi
8606 < rm -f conftest.err conftest.$ac_objext \
8607 <      conftest$ac_exeext conftest.$ac_ext
7294 < LIBS=$ac_check_lib_save_LIBS
8606 > rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8607 >  conftest.$ac_objext conftest.beam conftest.$ac_ext
8608   fi
7296 echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
7297 echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
7298 if test $ac_cv_lib_mpi_MPI_Init = yes; then
7299  MPI_LIB="-lmpi -llam -lpthread"
7300 else
8609  
7302             { { echo "$as_me:$LINENO: error: Didn't find liblam, libmpi, or libmpich; check path for MPI package first..." >&5
7303 echo "$as_me: error: Didn't find liblam, libmpi, or libmpich; check path for MPI package first..." >&2;}
7304   { (exit 1); exit 1; }; }
7305             USE_MPI="no"
7306
8610   fi
8611 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
8612 + $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
8613 + if test $ac_cv_func_malloc_0_nonnull = yes; then :
8614  
8615 < fi
8615 > $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
8616  
7311
7312
7313 echo "$as_me:$LINENO: checking for MPI Fortran library" >&5
7314 echo $ECHO_N "checking for MPI Fortran library... $ECHO_C" >&6
7315 MPI_F90_LIB=""
7316 if test -f "$MPI_LIB_DIR/libfmpich.a" ; then
7317        MPI_F90_LIB="-lfmpich"
7318 elif test -f "$MPI_LIB_DIR/liblamf77mpi.a" ; then
7319        MPI_F90_LIB="-llamf77mpi"
8617   else
8618 <                        MPI_F90_LIB="  "
7322 < fi
7323 < echo "$as_me:$LINENO: result: found $MPI_F90_LIB" >&5
7324 < echo "${ECHO_T}found $MPI_F90_LIB" >&6
8618 >  $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
8619  
8620 <
8621 < fi
8622 <
8623 <
7330 <
7331 < # Check whether --with-sprng or --without-sprng was given.
7332 < if test "${with_sprng+set}" = set; then
7333 <  withval="$with_sprng"
7334 <  with_sprng=$withval
7335 < else
7336 <  with_sprng="/usr/local"
7337 < fi;
7338 <
7339 < case "x$with_sprng" in
7340 <        xyes | "x")  USE_SPRNG=yes;;
7341 <        xno) USE_SPRNG=no ;;
7342 <        *) SPRNG="$with_sprng"; USE_SPRNG=yes ;;
8620 >   case " $LIBOBJS " in
8621 >  *" malloc.$ac_objext "* ) ;;
8622 >  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
8623 > ;;
8624   esac
7344 if test "$USE_SPRNG" = "yes" -a -z "$with_sprng"; then
7345        SPRNG="/usr/local"
7346 fi
7347 if test "$USE_SPRNG" = "yes"; then
8625  
8626  
8627 < # Set variables...
7351 < SPRNG_LIB_DIR="$SPRNG/lib"
7352 < SPRNG_INC_DIR="$SPRNG/include"
8627 > $as_echo "#define malloc rpl_malloc" >>confdefs.h
8628  
7354
7355
7356 echo "$as_me:$LINENO: checking for sprng.h" >&5
7357 echo $ECHO_N "checking for sprng.h... $ECHO_C" >&6
7358 have_sprng_h=0
7359 echo '#include <sprng.h>' > conftest.cc
7360 if test -z "`${CXX} -I${SPRNG_INC_DIR} -c conftest.cc 2>&1`"; then
7361        echo "$as_me:$LINENO: result: yes" >&5
7362 echo "${ECHO_T}yes" >&6
7363        have_sprng_h=1
7364 else
7365        echo "$as_me:$LINENO: result: no! Check SPRNG include path!" >&5
7366 echo "${ECHO_T}no! Check SPRNG include path!" >&6
7367        USE_SPRNG="no"
8629   fi
7369 rm -f conftest*
7370 if test "$have_sprng_h" = 1; then
8630  
8631 < cat >>confdefs.h <<\_ACEOF
8632 < #define HAVE_SPRNG_H 1
8631 >
8632 > for ac_header in stdlib.h
8633 > do :
8634 >  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
8635 > if test "x$ac_cv_header_stdlib_h" = x""yes; then :
8636 >  cat >>confdefs.h <<_ACEOF
8637 > #define HAVE_STDLIB_H 1
8638   _ACEOF
8639  
8640   fi
8641  
8642 < ac_ext=c
7379 < ac_cpp='$CPP $CPPFLAGS'
7380 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7381 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7382 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
8642 > done
8643  
8644 < ac_save_LDFLAGS=$LDFLAGS
8645 < LDFLAGS="${LDFLAGS} -L${SPRNG_LIB_DIR} "
8646 <
8647 < echo "$as_me:$LINENO: checking for init_rng in -lsprng" >&5
7388 < echo $ECHO_N "checking for init_rng in -lsprng... $ECHO_C" >&6
7389 < if test "${ac_cv_lib_sprng_init_rng+set}" = set; then
7390 <  echo $ECHO_N "(cached) $ECHO_C" >&6
8644 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
8645 > $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
8646 > if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then :
8647 >  $as_echo_n "(cached) " >&6
8648   else
8649 <  ac_check_lib_save_LIBS=$LIBS
8650 < LIBS="-lsprng  $LIBS"
8651 < cat >conftest.$ac_ext <<_ACEOF
8652 < /* confdefs.h.  */
7396 < _ACEOF
7397 < cat confdefs.h >>conftest.$ac_ext
7398 < cat >>conftest.$ac_ext <<_ACEOF
8649 >  if test "$cross_compiling" = yes; then :
8650 >  ac_cv_func_realloc_0_nonnull=no
8651 > else
8652 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8653   /* end confdefs.h.  */
8654 + #if defined STDC_HEADERS || defined HAVE_STDLIB_H
8655 + # include <stdlib.h>
8656 + #else
8657 + char *realloc ();
8658 + #endif
8659  
8660 < /* Override any gcc2 internal prototype to avoid an error.  */
8661 < #ifdef __cplusplus
8662 < extern "C"
8660 > #ifdef FC_DUMMY_MAIN
8661 > #ifndef FC_DUMMY_MAIN_EQ_F77
8662 > #  ifdef __cplusplus
8663 >     extern "C"
8664 > #  endif
8665 >   int FC_DUMMY_MAIN() { return 1; }
8666   #endif
8667 < /* We use char because int might match the return type of a gcc2
7406 <   builtin and then its argument prototype would still apply.  */
7407 < char init_rng ();
8667 > #endif
8668   int
8669   main ()
8670   {
8671 < init_rng ();
8671 > return ! realloc (0, 0);
8672    ;
8673    return 0;
8674   }
8675   _ACEOF
8676 < rm -f conftest.$ac_objext conftest$ac_exeext
8677 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7418 <  (eval $ac_link) 2>conftest.er1
7419 <  ac_status=$?
7420 <  grep -v '^ *+' conftest.er1 >conftest.err
7421 <  rm -f conftest.er1
7422 <  cat conftest.err >&5
7423 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424 <  (exit $ac_status); } &&
7425 <         { ac_try='test -z "$ac_c_werror_flag"
7426 <                         || test ! -s conftest.err'
7427 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7428 <  (eval $ac_try) 2>&5
7429 <  ac_status=$?
7430 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7431 <  (exit $ac_status); }; } &&
7432 <         { ac_try='test -s conftest$ac_exeext'
7433 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7434 <  (eval $ac_try) 2>&5
7435 <  ac_status=$?
7436 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7437 <  (exit $ac_status); }; }; then
7438 <  ac_cv_lib_sprng_init_rng=yes
8676 > if ac_fn_c_try_run "$LINENO"; then :
8677 >  ac_cv_func_realloc_0_nonnull=yes
8678   else
8679 <  echo "$as_me: failed program was:" >&5
7441 < sed 's/^/| /' conftest.$ac_ext >&5
7442 <
7443 < ac_cv_lib_sprng_init_rng=no
8679 >  ac_cv_func_realloc_0_nonnull=no
8680   fi
8681 < rm -f conftest.err conftest.$ac_objext \
8682 <      conftest$ac_exeext conftest.$ac_ext
7447 < LIBS=$ac_check_lib_save_LIBS
8681 > rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8682 >  conftest.$ac_objext conftest.beam conftest.$ac_ext
8683   fi
7449 echo "$as_me:$LINENO: result: $ac_cv_lib_sprng_init_rng" >&5
7450 echo "${ECHO_T}$ac_cv_lib_sprng_init_rng" >&6
7451 if test $ac_cv_lib_sprng_init_rng = yes; then
7452  SPRNG_LIB="-lsprng"
7453 else
8684  
7455             { { echo "$as_me:$LINENO: error: Didn't find libsprng; check path for SPRNG package first..." >&5
7456 echo "$as_me: error: Didn't find libsprng; check path for SPRNG package first..." >&2;}
7457   { (exit 1); exit 1; }; }
7458             USE_SPRNG="no"
7459
8685   fi
8686 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
8687 + $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
8688 + if test $ac_cv_func_realloc_0_nonnull = yes; then :
8689  
8690 + $as_echo "#define HAVE_REALLOC 1" >>confdefs.h
8691  
8692 < if test "$USE_SPRNG" = "no"; then
8693 <  { { echo "$as_me:$LINENO: error: No working SPRNG library found" >&5
7465 < echo "$as_me: error: No working SPRNG library found" >&2;}
7466 <   { (exit 1); exit 1; }; }
7467 < fi
8692 > else
8693 >  $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
8694  
8695 +   case " $LIBOBJS " in
8696 +  *" realloc.$ac_objext "* ) ;;
8697 +  *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
8698 + ;;
8699 + esac
8700  
7470 fi
8701  
8702 + $as_echo "#define realloc rpl_realloc" >>confdefs.h
8703  
8704 + fi
8705  
7474 echo "$as_me:$LINENO: checking if MKL is wanted" >&5
7475 echo $ECHO_N "checking if MKL is wanted... $ECHO_C" >&6
8706  
8707 < # Check whether --with-mkl or --without-mkl was given.
8708 < if test "${with_mkl+set}" = set; then
8709 <  withval="$with_mkl"
8710 <     echo "$as_me:$LINENO: result: yes" >&5
8711 < echo "${ECHO_T}yes" >&6
8712 <    for dir in $withval /usr/local/intel/mkl61 /opt/intel/mkl61; do
8713 <        mkldir="$dir"
8714 <        if test -f "$dir/include/mkl.h"; then
8715 <            found_mkl="yes";
7486 <            break;
7487 <        fi
7488 <    done
7489 <    if test x_$found_mkl != x_yes; then
7490 <        { { echo "$as_me:$LINENO: error: Cannot find MKL includes" >&5
7491 < echo "$as_me: error: Cannot find MKL includes" >&2;}
7492 <   { (exit 1); exit 1; }; }
7493 <    else
7494 <        printf "MKL includes found in $mkldir/include\n";
7495 <    fi
8707 > for ac_header in sys/select.h sys/socket.h
8708 > do :
8709 >  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8710 > ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8711 > eval as_val=\$$as_ac_Header
8712 >   if test "x$as_val" = x""yes; then :
8713 >  cat >>confdefs.h <<_ACEOF
8714 > #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8715 > _ACEOF
8716  
8717 + fi
8718  
8719 + done
8720  
8721 <  ac_ext=c
8722 < ac_cpp='$CPP $CPPFLAGS'
8723 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8724 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7503 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
7504 <
7505 <  ac_save_CPPFLAGS=$CPPFLAGS
7506 <  CPPFLAGS="${CPPFLAGS} -I${mkldir}/include"
7507 <  ac_save_LDFLAGS=$LDFLAGS
7508 <  LDFLAGS="${LDFLAGS} -L${mkldir}/lib/32 -lmkl -lvml -lguide"
7509 <  if test "${ac_cv_header_mkl_h+set}" = set; then
7510 <  echo "$as_me:$LINENO: checking for mkl.h" >&5
7511 < echo $ECHO_N "checking for mkl.h... $ECHO_C" >&6
7512 < if test "${ac_cv_header_mkl_h+set}" = set; then
7513 <  echo $ECHO_N "(cached) $ECHO_C" >&6
7514 < fi
7515 < echo "$as_me:$LINENO: result: $ac_cv_header_mkl_h" >&5
7516 < echo "${ECHO_T}$ac_cv_header_mkl_h" >&6
8721 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
8722 > $as_echo_n "checking types of arguments for select... " >&6; }
8723 > if test "${ac_cv_func_select_args+set}" = set; then :
8724 >  $as_echo_n "(cached) " >&6
8725   else
8726 <  # Is the header compilable?
8727 < echo "$as_me:$LINENO: checking mkl.h usability" >&5
8728 < echo $ECHO_N "checking mkl.h usability... $ECHO_C" >&6
8729 < cat >conftest.$ac_ext <<_ACEOF
7522 < /* confdefs.h.  */
7523 < _ACEOF
7524 < cat confdefs.h >>conftest.$ac_ext
7525 < cat >>conftest.$ac_ext <<_ACEOF
8726 >  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
8727 > for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
8728 >  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
8729 >   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8730   /* end confdefs.h.  */
8731   $ac_includes_default
8732 < #include <mkl.h>
8732 > #ifdef HAVE_SYS_SELECT_H
8733 > # include <sys/select.h>
8734 > #endif
8735 > #ifdef HAVE_SYS_SOCKET_H
8736 > # include <sys/socket.h>
8737 > #endif
8738 >
8739 > #ifdef FC_DUMMY_MAIN
8740 > #ifndef FC_DUMMY_MAIN_EQ_F77
8741 > #  ifdef __cplusplus
8742 >     extern "C"
8743 > #  endif
8744 >   int FC_DUMMY_MAIN() { return 1; }
8745 > #endif
8746 > #endif
8747 > int
8748 > main ()
8749 > {
8750 > extern int select ($ac_arg1,
8751 >                                            $ac_arg234, $ac_arg234, $ac_arg234,
8752 >                                            $ac_arg5);
8753 >  ;
8754 >  return 0;
8755 > }
8756   _ACEOF
8757 < rm -f conftest.$ac_objext
8758 < if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8759 <  (eval $ac_compile) 2>conftest.er1
8760 <  ac_status=$?
8761 <  grep -v '^ *+' conftest.er1 >conftest.err
8762 <  rm -f conftest.er1
8763 <  cat conftest.err >&5
8764 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8765 <  (exit $ac_status); } &&
7539 <         { ac_try='test -z "$ac_c_werror_flag"
7540 <                         || test ! -s conftest.err'
7541 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7542 <  (eval $ac_try) 2>&5
7543 <  ac_status=$?
7544 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7545 <  (exit $ac_status); }; } &&
7546 <         { ac_try='test -s conftest.$ac_objext'
7547 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7548 <  (eval $ac_try) 2>&5
7549 <  ac_status=$?
7550 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7551 <  (exit $ac_status); }; }; then
7552 <  ac_header_compiler=yes
7553 < else
7554 <  echo "$as_me: failed program was:" >&5
7555 < sed 's/^/| /' conftest.$ac_ext >&5
8757 > if ac_fn_c_try_compile "$LINENO"; then :
8758 >  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
8759 > fi
8760 > rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8761 >  done
8762 > done
8763 > done
8764 > # Provide a safe default value.
8765 > : ${ac_cv_func_select_args='int,int *,struct timeval *'}
8766  
7557 ac_header_compiler=no
8767   fi
8768 < rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8769 < echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8770 < echo "${ECHO_T}$ac_header_compiler" >&6
8768 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
8769 > $as_echo "$ac_cv_func_select_args" >&6; }
8770 > ac_save_IFS=$IFS; IFS=','
8771 > set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
8772 > IFS=$ac_save_IFS
8773 > shift
8774  
8775 < # Is the header present?
8776 < echo "$as_me:$LINENO: checking mkl.h presence" >&5
7565 < echo $ECHO_N "checking mkl.h presence... $ECHO_C" >&6
7566 < cat >conftest.$ac_ext <<_ACEOF
7567 < /* confdefs.h.  */
8775 > cat >>confdefs.h <<_ACEOF
8776 > #define SELECT_TYPE_ARG1 $1
8777   _ACEOF
8778 < cat confdefs.h >>conftest.$ac_ext
8779 < cat >>conftest.$ac_ext <<_ACEOF
8780 < /* end confdefs.h.  */
8781 < #include <mkl.h>
8778 >
8779 >
8780 > cat >>confdefs.h <<_ACEOF
8781 > #define SELECT_TYPE_ARG234 ($2)
8782   _ACEOF
8783 < if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8784 <  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8785 <  ac_status=$?
8786 <  grep -v '^ *+' conftest.er1 >conftest.err
8787 <  rm -f conftest.er1
8788 <  cat conftest.err >&5
8789 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8790 <  (exit $ac_status); } >/dev/null; then
8791 <  if test -s conftest.err; then
8792 <    ac_cpp_err=$ac_c_preproc_warn_flag
8793 <    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8794 <  else
7586 <    ac_cpp_err=
7587 <  fi
8783 >
8784 >
8785 > cat >>confdefs.h <<_ACEOF
8786 > #define SELECT_TYPE_ARG5 ($3)
8787 > _ACEOF
8788 >
8789 > rm -f conftest*
8790 >
8791 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
8792 > $as_echo_n "checking for working strtod... " >&6; }
8793 > if test "${ac_cv_func_strtod+set}" = set; then :
8794 >  $as_echo_n "(cached) " >&6
8795   else
8796 <  ac_cpp_err=yes
8797 < fi
7591 < if test -z "$ac_cpp_err"; then
7592 <  ac_header_preproc=yes
8796 >  if test "$cross_compiling" = yes; then :
8797 >  ac_cv_func_strtod=no
8798   else
8799 <  echo "$as_me: failed program was:" >&5
8800 < sed 's/^/| /' conftest.$ac_ext >&5
8799 >  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8800 > /* end confdefs.h.  */
8801  
8802 <  ac_header_preproc=no
8803 < fi
8804 < rm -f conftest.err conftest.$ac_ext
8805 < echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8806 < echo "${ECHO_T}$ac_header_preproc" >&6
8802 > $ac_includes_default
8803 > #ifndef strtod
8804 > double strtod ();
8805 > #endif
8806 > int
8807 > main()
8808 > {
8809 >  {
8810 >    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
8811 >    char *string = " +69";
8812 >    char *term;
8813 >    double value;
8814 >    value = strtod (string, &term);
8815 >    if (value != 69 || term != (string + 4))
8816 >      return 1;
8817 >  }
8818  
8819 < # So?  What about this header?
8820 < case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8821 <  yes:no: )
8822 <    { echo "$as_me:$LINENO: WARNING: mkl.h: accepted by the compiler, rejected by the preprocessor!" >&5
8823 < echo "$as_me: WARNING: mkl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8824 <    { echo "$as_me:$LINENO: WARNING: mkl.h: proceeding with the compiler's result" >&5
8825 < echo "$as_me: WARNING: mkl.h: proceeding with the compiler's result" >&2;}
8826 <    ac_header_preproc=yes
8827 <    ;;
8828 <  no:yes:* )
8829 <    { echo "$as_me:$LINENO: WARNING: mkl.h: present but cannot be compiled" >&5
8830 < echo "$as_me: WARNING: mkl.h: present but cannot be compiled" >&2;}
8831 <    { echo "$as_me:$LINENO: WARNING: mkl.h:     check for missing prerequisite headers?" >&5
8832 < echo "$as_me: WARNING: mkl.h:     check for missing prerequisite headers?" >&2;}
8833 <    { echo "$as_me:$LINENO: WARNING: mkl.h: see the Autoconf documentation" >&5
7618 < echo "$as_me: WARNING: mkl.h: see the Autoconf documentation" >&2;}
7619 <    { echo "$as_me:$LINENO: WARNING: mkl.h:     section \"Present But Cannot Be Compiled\"" >&5
7620 < echo "$as_me: WARNING: mkl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
7621 <    { echo "$as_me:$LINENO: WARNING: mkl.h: proceeding with the preprocessor's result" >&5
7622 < echo "$as_me: WARNING: mkl.h: proceeding with the preprocessor's result" >&2;}
7623 <    { echo "$as_me:$LINENO: WARNING: mkl.h: in the future, the compiler will take precedence" >&5
7624 < echo "$as_me: WARNING: mkl.h: in the future, the compiler will take precedence" >&2;}
7625 <    (
7626 <      cat <<\_ASBOX
7627 < ## ------------------------------ ##
7628 < ## Report this to gezelter@nd.edu ##
7629 < ## ------------------------------ ##
7630 < _ASBOX
7631 <    ) |
7632 <      sed "s/^/$as_me: WARNING:     /" >&2
7633 <    ;;
7634 < esac
7635 < echo "$as_me:$LINENO: checking for mkl.h" >&5
7636 < echo $ECHO_N "checking for mkl.h... $ECHO_C" >&6
7637 < if test "${ac_cv_header_mkl_h+set}" = set; then
7638 <  echo $ECHO_N "(cached) $ECHO_C" >&6
8819 >  {
8820 >    /* Under Solaris 2.4, strtod returns the wrong value for the
8821 >       terminating character under some conditions.  */
8822 >    char *string = "NaN";
8823 >    char *term;
8824 >    strtod (string, &term);
8825 >    if (term != string && *(term - 1) == 0)
8826 >      return 1;
8827 >  }
8828 >  return 0;
8829 > }
8830 >
8831 > _ACEOF
8832 > if ac_fn_c_try_run "$LINENO"; then :
8833 >  ac_cv_func_strtod=yes
8834   else
8835 <  ac_cv_header_mkl_h=$ac_header_preproc
8835 >  ac_cv_func_strtod=no
8836   fi
8837 < echo "$as_me:$LINENO: result: $ac_cv_header_mkl_h" >&5
8838 < echo "${ECHO_T}$ac_cv_header_mkl_h" >&6
8837 > rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8838 >  conftest.$ac_objext conftest.beam conftest.$ac_ext
8839 > fi
8840  
8841   fi
8842 < if test $ac_cv_header_mkl_h = yes; then
8842 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
8843 > $as_echo "$ac_cv_func_strtod" >&6; }
8844 > if test $ac_cv_func_strtod = no; then
8845 >  case " $LIBOBJS " in
8846 >  *" strtod.$ac_objext "* ) ;;
8847 >  *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
8848 > ;;
8849 > esac
8850  
8851 <    echo "$as_me:$LINENO: checking for vslNewStream in -lmkl" >&5
8852 < echo $ECHO_N "checking for vslNewStream in -lmkl... $ECHO_C" >&6
8853 < if test "${ac_cv_lib_mkl_vslNewStream+set}" = set; then
8854 <  echo $ECHO_N "(cached) $ECHO_C" >&6
8851 > ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
8852 > if test "x$ac_cv_func_pow" = x""yes; then :
8853 >
8854 > fi
8855 >
8856 > if test $ac_cv_func_pow = no; then
8857 >  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
8858 > $as_echo_n "checking for pow in -lm... " >&6; }
8859 > if test "${ac_cv_lib_m_pow+set}" = set; then :
8860 >  $as_echo_n "(cached) " >&6
8861   else
8862    ac_check_lib_save_LIBS=$LIBS
8863 < LIBS="-lmkl  $LIBS"
8864 < cat >conftest.$ac_ext <<_ACEOF
7656 < /* confdefs.h.  */
7657 < _ACEOF
7658 < cat confdefs.h >>conftest.$ac_ext
7659 < cat >>conftest.$ac_ext <<_ACEOF
8863 > LIBS="-lm  $LIBS"
8864 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8865   /* end confdefs.h.  */
8866  
8867 < /* Override any gcc2 internal prototype to avoid an error.  */
8867 > /* Override any GCC internal prototype to avoid an error.
8868 >   Use char because int might match the return type of a GCC
8869 >   builtin and then its argument prototype would still apply.  */
8870   #ifdef __cplusplus
8871   extern "C"
8872   #endif
8873 < /* We use char because int might match the return type of a gcc2
8874 <   builtin and then its argument prototype would still apply.  */
8875 < char vslNewStream ();
8873 > char pow ();
8874 > #ifdef FC_DUMMY_MAIN
8875 > #ifndef FC_DUMMY_MAIN_EQ_F77
8876 > #  ifdef __cplusplus
8877 >     extern "C"
8878 > #  endif
8879 >   int FC_DUMMY_MAIN() { return 1; }
8880 > #endif
8881 > #endif
8882   int
8883   main ()
8884   {
8885 < vslNewStream ();
8885 > return pow ();
8886    ;
8887    return 0;
8888   }
8889   _ACEOF
8890 < rm -f conftest.$ac_objext conftest$ac_exeext
8891 < if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7679 <  (eval $ac_link) 2>conftest.er1
7680 <  ac_status=$?
7681 <  grep -v '^ *+' conftest.er1 >conftest.err
7682 <  rm -f conftest.er1
7683 <  cat conftest.err >&5
7684 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685 <  (exit $ac_status); } &&
7686 <         { ac_try='test -z "$ac_c_werror_flag"
7687 <                         || test ! -s conftest.err'
7688 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7689 <  (eval $ac_try) 2>&5
7690 <  ac_status=$?
7691 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7692 <  (exit $ac_status); }; } &&
7693 <         { ac_try='test -s conftest$ac_exeext'
7694 <  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7695 <  (eval $ac_try) 2>&5
7696 <  ac_status=$?
7697 <  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7698 <  (exit $ac_status); }; }; then
7699 <  ac_cv_lib_mkl_vslNewStream=yes
8890 > if ac_fn_c_try_link "$LINENO"; then :
8891 >  ac_cv_lib_m_pow=yes
8892   else
8893 <  echo "$as_me: failed program was:" >&5
7702 < sed 's/^/| /' conftest.$ac_ext >&5
7703 <
7704 < ac_cv_lib_mkl_vslNewStream=no
8893 >  ac_cv_lib_m_pow=no
8894   fi
8895 < rm -f conftest.err conftest.$ac_objext \
8896 <      conftest$ac_exeext conftest.$ac_ext
8895 > rm -f core conftest.err conftest.$ac_objext \
8896 >    conftest$ac_exeext conftest.$ac_ext
8897   LIBS=$ac_check_lib_save_LIBS
8898   fi
8899 < echo "$as_me:$LINENO: result: $ac_cv_lib_mkl_vslNewStream" >&5
8900 < echo "${ECHO_T}$ac_cv_lib_mkl_vslNewStream" >&6
8901 < if test $ac_cv_lib_mkl_vslNewStream = yes; then
8902 <  MKL_LIBDIR="${mkldir}/lib/32",
8903 <                     MKL_LIB="-lmkl -lvml -lguide",
8904 <                     HAVE_MKL="yes"
8899 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
8900 > $as_echo "$ac_cv_lib_m_pow" >&6; }
8901 > if test "x$ac_cv_lib_m_pow" = x""yes; then :
8902 >  POW_LIB=-lm
8903 > else
8904 >  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
8905 > $as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
8906   fi
8907  
8908 + fi
8909  
7719 else
7720  MKL_INC="-I${mkldir}/include"
8910   fi
8911  
8912 + for ac_func in floor getpagesize gettimeofday memset pow pstat_getdynamic pstat_getstatic select sqrt strcasecmp strchr strdup stricmp strncasecmp strnicmp strstr strtol sysmp getsysinfo sysctl table
8913 + do :
8914 +  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8915 + ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8916 + eval as_val=\$$as_ac_var
8917 +   if test "x$as_val" = x""yes; then :
8918 +  cat >>confdefs.h <<_ACEOF
8919 + #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8920 + _ACEOF
8921  
8922 <  CPPFLAGS=$ac_save_CPPFLAGS
8923 <  LDFLAGS=$ac_save_LDFLAGS
7726 <  ac_ext=c
7727 < ac_cpp='$CPP $CPPFLAGS'
7728 < ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7729 < ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7730 < ac_compiler_gnu=$ac_cv_c_compiler_gnu
8922 > fi
8923 > done
8924  
8925  
8926 <  if test x_$HAVE_MKL != x_yes; then
8927 <        { { echo "$as_me:$LINENO: error: Can't build with MKL" >&5
8928 < echo "$as_me: error: Can't build with MKL" >&2;}
8929 <   { (exit 1); exit 1; }; }
8930 <  fi
8926 > # special check for _system_configuration because AIX <4.3.2 do not
8927 > # contain the `physmem' member.
8928 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for external symbol _system_configuration" >&5
8929 > $as_echo_n "checking for external symbol _system_configuration... " >&6; }
8930 > cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8931 > /* end confdefs.h.  */
8932 > #include <sys/systemcfg.h>
8933 > #ifdef FC_DUMMY_MAIN
8934 > #ifndef FC_DUMMY_MAIN_EQ_F77
8935 > #  ifdef __cplusplus
8936 >     extern "C"
8937 > #  endif
8938 >   int FC_DUMMY_MAIN() { return 1; }
8939 > #endif
8940 > #endif
8941 > int
8942 > main ()
8943 > {
8944 > double x = _system_configuration.physmem;
8945 >  ;
8946 >  return 0;
8947 > }
8948 > _ACEOF
8949 > if ac_fn_c_try_compile "$LINENO"; then :
8950 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8951 > $as_echo "yes" >&6; }
8952  
8953 + $as_echo "#define HAVE__SYSTEM_CONFIGURATION 1" >>confdefs.h
8954  
8955 + else
8956 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8957 + $as_echo "no" >&6; }
8958 + fi
8959 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8960  
8961  
8962 + case $debug in
8963 +  1)
8964 +     ;;
8965 +  *)
8966  
7743 else
8967  
7745    echo "$as_me:$LINENO: result: no" >&5
7746 echo "${ECHO_T}no" >&6
8968  
7748 fi;
8969  
8970  
8971 + # Try to determine "good" native compiler flags if none specified on command
8972 + # line
8973  
8974 + if test "$ac_test_FFLAGS" != "set"; then
8975 +  FCFLAGS=""
8976 +  case "${host_cpu}-${host_os}" in
8977  
8978 +  *linux*) if test "$FC" = ifc -o "$FC" = ifort; then
8979 +                    FCFLAGS="-O2"
8980 +                fi;;
8981 +   rs6000*-aix*)  if test "$FC" = xlf90 -o "$FC" = f90 -o "$FC" = xlf95; then
8982 +                    FCFLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w"
8983 +                fi;;
8984 +   powerpc*-aix*)
8985 +        if test "$FC" = f90 -o "$FC" = xlf90 -o "$FC" = xlf95; then
8986 +                FCFLAGS="-O3 -qarch=ppc -qansialias -w"
8987 +                echo "*******************************************************"
8988 +                echo "*  You have AIX on an unknown powerpc system.  It is  *"
8989 +                echo "*  recommended that you use                           *"
8990 +                echo "*                                                     *"
8991 +                echo "*   FCFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
8992 +                echo "*                                 ^^^                 *"
8993 +                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
8994 +                echo "*  PowerPC CPU you have.   For more info, man xlf.    *"
8995 +                echo "*******************************************************"
8996 +        fi;;
8997 +   *darwin*)
8998 +        if test "$FC" = f90 -o "$FC" = xlf90 -o "$FC" = xlf95; then
8999 +                FCFLAGS="-qthreaded -O -qtune=auto -qarch=auto -qunroll=auto"
9000 +        fi
9001 +        if test "$FC" = ifort; then
9002 +                FCFLAGS="-O2"
9003 +        fi
9004 +        if test "$FC" = gfortran; then
9005 +                FCFLAGS="-Os"
9006 +        fi;;
9007 +  esac
9008  
9009 < OBJEXT=".$OBJEXT"
9009 >  if test -z "$FCFLAGS"; then
9010 >        echo ""
9011 >        echo "*********************************************************"
9012 >        echo "* WARNING: Don't know the best FCFLAGS for this system  *"
9013 >        echo "* Use  make FCFLAGS=..., or edit the top level Makefile *"
9014 >        echo "* (otherwise, a default of FCFLAGS=-O will be used)     *"
9015 >        echo "*********************************************************"
9016 >        echo ""
9017 >        FCFLAGS="-O"
9018 >  fi
9019  
7756 OOPSE=oopse
9020  
9021 < if test "x${prefix}" = "xNONE"
9022 < then
9023 <  OOPSE_HOME=${ac_default_prefix}/oopse
9021 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${FC} accepts ${FCFLAGS}" >&5
9022 > $as_echo_n "checking whether ${FC} accepts ${FCFLAGS}... " >&6; }
9023 > if test "${ac_cv_ac_cv_guessed_f90flags+set}" = set; then :
9024 >  $as_echo_n "(cached) " >&6
9025   else
7762  OOPSE_HOME=${prefix}/oopse
7763 fi
7764 # Check whether --enable-oopse-home or --disable-oopse-home was given.
7765 if test "${enable_oopse_home+set}" = set; then
7766  enableval="$enable_oopse_home"
7767  OOPSE_HOME="${enableval}"
7768 fi;
9026  
7770 case "x$INSTALL" in
7771   x/*) ;;
7772   *) INSTALL=`pwd`/ac-tools/"shtool install -c" ;
7773 esac
9027  
9028 < MKINSTALLDIRS=`pwd`/ac-tools/"shtool mkdir -p -f"
9028 > ac_ext=${ac_fc_srcext-f}
9029 > ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
9030 > ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
9031 > ac_compiler_gnu=$ac_cv_fc_compiler_gnu
9032  
9033 < CFLAGS=${CFLAGS-""}
9034 < CXXFLAGS=${CXXFLAGS-""}
9035 < CPPFLAGS=${CPPFLAGS-""}
9036 < FFLAGS=${FFLAGS-""}
9037 < F90FLAGS=${F90FLAGS-""}
9038 < LDFLAGS=${LDFLAGS-""}
9039 < DEBUG=${DEBUG-"-g"}
9033 > echo 'program main' > conftest.$ac_ext
9034 > echo 'end program main' >> conftest.$ac_ext
9035 > ac_compile='${FC} -c ${FCFLAGS} $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext 1>&5'
9036 > if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9037 >  (eval $ac_compile) 2>&5
9038 >  ac_status=$?
9039 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9040 >  test $ac_status = 0; }; then
9041 >        ac_cv_ac_cv_guessed_f90flags=yes
9042 > else
9043 >        ac_cv_ac_cv_guessed_f90flags=no
9044 > fi
9045 > rm -f conftest*
9046 > ac_ext=c
9047 > ac_cpp='$CPP $CPPFLAGS'
9048 > ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9049 > ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9050 > ac_compiler_gnu=$ac_cv_c_compiler_gnu
9051  
7785 case $debug in
7786  1)
7787     FFLAGS="$DEBUG $FFLAGS"
7788     F90FLAGS="$DEBUG $F90FLAGS"
7789     ;;
7790  *)
7791     ;;
7792 esac
9052  
9053 + fi
9054 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ac_cv_guessed_f90flags" >&5
9055 + $as_echo "$ac_cv_ac_cv_guessed_f90flags" >&6; }
9056 + if test "$ac_cv_ac_cv_guessed_f90flags" = yes; then
9057 +        :
9058  
9059 + else
9060 +        :
9061  
9062 +        echo ""
9063 +        echo "**********************************************************"
9064 +        echo "* WARNING: The guessed FCFLAGS don't seem to work with  *"
9065 +        echo "* your compiler.                                        *"
9066 +        echo "* Use  make FCFLAGS=..., or edit the top level Makefile *"
9067 +        echo "*********************************************************"
9068 +        echo ""
9069 +        FCFLAGS=""
9070  
9071 + fi
9072  
9073  
9074 + fi
9075  
9076  
9077  
# Line 7803 | Line 9079 | esac
9079  
9080  
9081  
9082 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are *really* using GNU cc" >&5
9083 + $as_echo_n "checking whether we are *really* using GNU cc... " >&6; }
9084 + if test "${ac_cv_prog_really_gcc+set}" = set; then :
9085 +  $as_echo_n "(cached) " >&6
9086 + else
9087  
9088 + cat > conftest.c <<EOF
9089 + #ifdef __GNUC__
9090 +  #if defined(__INTEL_COMPILER) || defined(__PATHCC__)
9091 +     no;
9092 +  #else
9093 +     yes;
9094 +  #endif
9095 + #endif
9096 + EOF
9097 + if { ac_try='${CC-cc} -E conftest.c'
9098 +  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
9099 +  (eval $ac_try) 2>&5
9100 +  ac_status=$?
9101 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9102 +  test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
9103 +  ac_cv_prog_really_gcc=yes
9104 + else
9105 +  ac_cv_prog_really_gcc=no
9106 + fi
9107  
9108 + fi
9109 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_really_gcc" >&5
9110 + $as_echo "$ac_cv_prog_really_gcc" >&6; }
9111 + if test "$ac_cv_prog_really_gcc" = yes; then
9112 +        :
9113  
9114 + else
9115 +        :
9116  
9117 + fi
9118  
7811          ac_config_headers="$ac_config_headers src/config.h"
9119  
9120 <          ac_config_files="$ac_config_files make/Makefile"
9120 > # Try to determine "good" native compiler flags if none specified on command
9121 > # line
9122 > if test "$ac_test_CFLAGS" != "set"; then
9123 >  CFLAGS=""
9124 >  case "${host_cpu}-${host_os}" in
9125  
9126 +  *linux*) if test "$CC" = icc; then
9127 +                    CFLAGS="-O2"
9128 +                fi;;
9129 +  sparc-solaris2*) if test "$CC" = cc; then
9130 +                    CFLAGS="-O -dalign"
9131 +                 fi;;
9132  
9133 < cat >confcache <<\_ACEOF
9134 < # This file is a shell script that caches the results of configure
9135 < # tests run on this system so they can be shared between configure
7819 < # scripts and configure runs, see configure's option --config-cache.
7820 < # It is not useful on other systems.  If it contains results you don't
7821 < # want to keep, you may remove or edit it.
7822 < #
7823 < # config.status only pays attention to the cache file if you give it
7824 < # the --recheck option to rerun configure.
7825 < #
7826 < # `ac_cv_env_foo' variables (set or unset) will be overridden when
7827 < # loading this file, other *unset* `ac_cv_foo' will be assigned the
7828 < # following values.
9133 >  alpha*-osf*)  if test "$CC" = cc; then
9134 >                    CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host -arch host -std1"
9135 >                fi;;
9136  
9137 < _ACEOF
9137 >  hppa*-hpux*)  if test "$CC" = cc; then
9138 >                    CFLAGS="-Ae +O3 +Oall"
9139 >                fi;;
9140  
9141 < # The following way of writing the cache mishandles newlines in values,
9142 < # but we know of no workaround that is simple, portable, and efficient.
9143 < # So, don't put newlines in cache variables' values.
9144 < # Ultrix sh set writes to stderr and can't be redirected directly,
9145 < # and sets the high bit in the cache file unless we assign to the vars.
9146 < {
9147 <  (set) 2>&1 |
9148 <    case `(ac_space=' '; set | grep ac_space) 2>&1` in
9149 <    *ac_space=\ *)
9150 <      # `set' does not quote correctly, so add quotes (double-quote
9151 <      # substitution turns \\\\ into \\, and sed turns \\ into \).
9152 <      sed -n \
9153 <        "s/'/'\\\\''/g;
9154 <          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
9155 <      ;;
9156 <    *)
9157 <      # `set' quotes correctly as required by POSIX, so do not add quotes.
9158 <      sed -n \
9159 <        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
9160 <      ;;
9161 <    esac;
9162 < } |
9163 <  sed '
9164 <     t clear
9165 <     : clear
9166 <     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9167 <     t end
9168 <     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9169 <     : end' >>confcache
9170 < if diff $cache_file confcache >/dev/null 2>&1; then :; else
9171 <  if test -w $cache_file; then
7863 <    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
7864 <    cat confcache >$cache_file
7865 <  else
7866 <    echo "not updating unwritable cache $cache_file"
9141 >   rs6000*-aix*)  if test "$CC" = cc -o "$CC" = xlc; then
9142 >                    CFLAGS="-O3 -qtune=auto -qansialias -w"
9143 >                fi;;
9144 >   powerpc*-aix*)
9145 >        if test "$CC" = cc -o "$CC" = xlc; then
9146 >                CFLAGS="-O3 -qtune=auto -qansialias -w"
9147 >                echo "*******************************************************"
9148 >                echo "*  You have AIX on an unknown powerpc system.  It is  *"
9149 >                echo "*  recommended that you use                           *"
9150 >                echo "*                                                     *"
9151 >                echo "*    CFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
9152 >                echo "*                                 ^^^                 *"
9153 >                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
9154 >                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
9155 >                echo "*******************************************************"
9156 >        fi;;
9157 >   *darwin*)
9158 >        if test "$CC" = xlc; then
9159 >                CFLAGS="-qthreaded -O -qtune=auto -qarch=auto -qunroll=auto -qaltivec"
9160 >        fi
9161 >        if test "$CC" = icc; then
9162 >                CFLAGS="-O2"
9163 >        fi
9164 >        if test $ac_cv_prog_really_gcc = yes; then
9165 >                CFLAGS="-Os"
9166 >        fi;;
9167 >  esac
9168 >
9169 >  # use default flags for gcc on all systems
9170 >  if test $ac_cv_prog_really_gcc = yes -a -z "$CFLAGS"; then
9171 >     CFLAGS="-O2"
9172    fi
7868 fi
7869 rm -f confcache
9173  
9174 < test "x$prefix" = xNONE && prefix=$ac_default_prefix
9175 < # Let make expand exec_prefix.
9176 < test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9174 >  if test -z "$CFLAGS"; then
9175 >        echo ""
9176 >        echo "********************************************************"
9177 >        echo "* WARNING: Don't know the best CFLAGS for this system  *"
9178 >        echo "* Use  make CFLAGS=..., or edit the top level Makefile *"
9179 >        echo "* (otherwise, a default of CFLAGS=-O will be used)     *"
9180 >        echo "********************************************************"
9181 >        echo ""
9182 >        CFLAGS="-O"
9183 >  fi
9184  
9185 < # VPATH may cause trouble with some makes, so we remove $(srcdir),
9186 < # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
9187 < # trailing colons and then remove the whole line if VPATH becomes empty
9188 < # (actually we leave an empty line to preserve line numbers).
9189 < if test "x$srcdir" = x.; then
9190 <  ac_vpsub='/^[  ]*VPATH[        ]*=/{
9191 < s/:*\$(srcdir):*/:/;
9192 < s/:*\${srcdir}:*/:/;
9193 < s/:*@srcdir@:*/:/;
9194 < s/^\([^=]*=[     ]*\):*/\1/;
9195 < s/:*$//;
9196 < s/^[^=]*=[       ]*$//;
7887 < }'
9185 >
9186 >
9187 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} accepts ${CFLAGS}" >&5
9188 > $as_echo_n "checking whether ${CC} accepts ${CFLAGS}... " >&6; }
9189 > if test "${ac_cv_ac_cv_guessed_cflags+set}" = set; then :
9190 >  $as_echo_n "(cached) " >&6
9191 > else
9192 >  echo 'void f(){}' > conftest.c
9193 > if test -z "`${CC} ${CFLAGS} -c conftest.c 2>&1`"; then
9194 >        ac_cv_ac_cv_guessed_cflags=yes
9195 > else
9196 >        ac_cv_ac_cv_guessed_cflags=no
9197   fi
9198 + rm -f conftest*
9199  
9200 < DEFS=-DHAVE_CONFIG_H
9200 > fi
9201 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ac_cv_guessed_cflags" >&5
9202 > $as_echo "$ac_cv_ac_cv_guessed_cflags" >&6; }
9203 > if test "$ac_cv_ac_cv_guessed_cflags" = yes; then
9204 >        :
9205  
9206 < ac_libobjs=
9207 < ac_ltlibobjs=
7894 < for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
7895 <  # 1. Remove the extension, and $U if already installed.
7896 <  ac_i=`echo "$ac_i" |
7897 <         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
7898 <  # 2. Add them.
7899 <  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
7900 <  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
7901 < done
7902 < LIBOBJS=$ac_libobjs
9206 > else
9207 >        :
9208  
9209 < LTLIBOBJS=$ac_ltlibobjs
9209 >        echo ""
9210 >        echo "********************************************************"
9211 >        echo "* WARNING: The guessed CFLAGS don't seem to work with  *"
9212 >        echo "* your compiler.                                       *"
9213 >        echo "* Use  make CFLAGS=..., or edit the top level Makefile *"
9214 >        echo "********************************************************"
9215 >        echo ""
9216 >        CFLAGS=""
9217  
9218 + fi
9219  
9220  
9221 < : ${CONFIG_STATUS=./config.status}
7909 < ac_clean_files_save=$ac_clean_files
7910 < ac_clean_files="$ac_clean_files $CONFIG_STATUS"
7911 < { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
7912 < echo "$as_me: creating $CONFIG_STATUS" >&6;}
7913 < cat >$CONFIG_STATUS <<_ACEOF
7914 < #! $SHELL
7915 < # Generated by $as_me.
7916 < # Run this file to recreate the current configuration.
7917 < # Compiler output produced by configure, useful for debugging
7918 < # configure, is in config.log if it exists.
9221 > fi
9222  
7920 debug=false
7921 ac_cs_recheck=false
7922 ac_cs_silent=false
7923 SHELL=\${CONFIG_SHELL-$SHELL}
7924 _ACEOF
9223  
7926 cat >>$CONFIG_STATUS <<\_ACEOF
7927 ## --------------------- ##
7928 ## M4sh Initialization.  ##
7929 ## --------------------- ##
9224  
7931 # Be Bourne compatible
7932 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
7933  emulate sh
7934  NULLCMD=:
7935  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
7936  # is contrary to our usage.  Disable this feature.
7937  alias -g '${1+"$@"}'='"$@"'
7938 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
7939  set -o posix
7940 fi
7941 DUALCASE=1; export DUALCASE # for MKS sh
9225  
9226 < # Support unset when possible.
9227 < if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9228 <  as_unset=unset
9229 < else
9230 <  as_unset=false
9226 >
9227 >
9228 >
9229 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are *really* using GNU c++" >&5
9230 > $as_echo_n "checking whether we are *really* using GNU c++... " >&6; }
9231 > if test "${ac_cv_prog_really_gxx+set}" = set; then :
9232 >  $as_echo_n "(cached) " >&6
9233 > else
9234 >
9235 > cat > conftest.cpp <<EOF
9236 > #ifdef __GNUC__
9237 >  #if defined(__INTEL_COMPILER) || defined(__PATHCC__)
9238 >     no;
9239 >  #else
9240 >     yes;
9241 >  #endif
9242 > #endif
9243 > EOF
9244 > if { ac_try='${CXX-c++} -E conftest.cpp'
9245 >  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
9246 >  (eval $ac_try) 2>&5
9247 >  ac_status=$?
9248 >  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9249 >  test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
9250 >  ac_cv_prog_really_gxx=yes
9251 > else
9252 >  ac_cv_prog_really_gxx=no
9253   fi
9254  
9255 + fi
9256 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_really_gxx" >&5
9257 + $as_echo "$ac_cv_prog_really_gxx" >&6; }
9258 + if test "$ac_cv_prog_really_gxx" = yes; then
9259 +        :
9260  
9261 < # Work around bugs in pre-3.0 UWIN ksh.
9262 < $as_unset ENV MAIL MAILPATH
7953 < PS1='$ '
7954 < PS2='> '
7955 < PS4='+ '
9261 > else
9262 >        :
9263  
9264 < # NLS nuisances.
9265 < for as_var in \
9266 <  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
9267 <  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
9268 <  LC_TELEPHONE LC_TIME
9269 < do
9270 <  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
9271 <    eval $as_var=C; export $as_var
9272 <  else
9273 <    $as_unset $as_var
9264 > fi
9265 >
9266 >
9267 > # Try to determine "good" native compiler flags if none specified on command
9268 > # line
9269 > if test "$ac_test_CXXFLAGS" != "set"; then
9270 >  CXXFLAGS=""
9271 >  case "${host_cpu}-${host_os}" in
9272 >
9273 >  *linux*) if test "$CXX" = icc -o "$CXX" = icpc; then
9274 >                    CXXFLAGS="-O2"
9275 >                fi;;
9276 >  sparc-solaris2*) if test "$CXX" = CC; then
9277 >                    CXXFLAGS="-features=extensions -O -dalign"
9278 >                 fi;;
9279 >   rs6000*-aix*)  if test "$CXX" = xlC; then
9280 >                    CXXFLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w"
9281 >                fi;;
9282 >   powerpc*-aix*)
9283 >        if test "$CXX" = xlC; then
9284 >                CXXFLAGS="-O3 -qarch=ppc -qansialias -w"
9285 >                echo "*******************************************************"
9286 >                echo "*  You have AIX on an unknown powerpc system.  It is  *"
9287 >                echo "*  recommended that you use                           *"
9288 >                echo "*                                                     *"
9289 >                echo "*  CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
9290 >                echo "*                                 ^^^                 *"
9291 >                echo "*  where xxx is 601, 603, 604, or whatever kind of    *"
9292 >                echo "*  PowerPC CPU you have.   For more info, man cc.     *"
9293 >                echo "*******************************************************"
9294 >        fi;;
9295 >   *darwin*)
9296 >        if test "$CXX" = xlc++ -o "$CXX" = xlC ; then
9297 >                CXXFLAGS="-qthreaded -O -qtune=auto -qarch=auto -qunroll=auto -qaltivec"
9298 >        fi
9299 >        if test "$CXX" = icpc; then
9300 >                CXXFLAGS="-O2"
9301 >        fi
9302 >        if test $ac_cv_prog_really_gxx = yes; then
9303 >                CXXFLAGS="-Os"
9304 >        fi;;
9305 >  esac
9306 >
9307 >  # use default flags for gcc on all systems
9308 >  if test $ac_cv_prog_really_gxx = yes -a -z "$CXXFLAGS"; then
9309 >     CXXFLAGS="-O2"
9310    fi
7968 done
9311  
9312 < # Required to use basename.
9313 < if expr a : '\(a\)' >/dev/null 2>&1; then
9314 <  as_expr=expr
9312 >  if test -z "$CXXFLAGS"; then
9313 >        echo ""
9314 >        echo "**********************************************************"
9315 >        echo "* WARNING: Don't know the best CXXFLAGS for this system  *"
9316 >        echo "* Use  make CXXFLAGS=..., or edit the top level Makefile *"
9317 >        echo "* (otherwise, a default of CXXFLAGS=-O will be used)     *"
9318 >        echo "**********************************************************"
9319 >        echo ""
9320 >        CXXFLAGS="-O"
9321 >  fi
9322 >
9323 >
9324 >
9325 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} accepts ${CXXFLAGS}" >&5
9326 > $as_echo_n "checking whether ${CXX} accepts ${CXXFLAGS}... " >&6; }
9327 > if test "${ac_cv_ac_cv_guessed_cxxflags+set}" = set; then :
9328 >  $as_echo_n "(cached) " >&6
9329   else
9330 <  as_expr=false
9330 >  echo 'void f(){}' > conftest.cpp
9331 > if test -z "`${CXX} ${CXXFLAGS} -c conftest.cpp 2>&1`"; then
9332 >        ac_cv_ac_cv_guessed_cxxflags=yes
9333 > else
9334 >        ac_cv_ac_cv_guessed_cxxflags=no
9335   fi
9336 + rm -f conftest*
9337  
9338 < if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
9339 <  as_basename=basename
9338 > fi
9339 > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ac_cv_guessed_cxxflags" >&5
9340 > $as_echo "$ac_cv_ac_cv_guessed_cxxflags" >&6; }
9341 > if test "$ac_cv_ac_cv_guessed_cxxflags" = yes; then
9342 >        :
9343 >
9344   else
9345 <  as_basename=false
9345 >        :
9346 >
9347 >        echo ""
9348 >        echo "**********************************************************"
9349 >        echo "* WARNING: The guessed CXXFLAGS don't seem to work with  *"
9350 >        echo "* your compiler.                                         *"
9351 >        echo "* Use  make CXXFLAGS=..., or edit the top level Makefile *"
9352 >        echo "**********************************************************"
9353 >        echo ""
9354 >        CXXFLAGS=""
9355 >
9356   fi
9357  
9358  
9359 < # Name of the executable.
7985 < as_me=`$as_basename "$0" ||
7986 < $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
7987 <         X"$0" : 'X\(//\)$' \| \
7988 <         X"$0" : 'X\(/\)$' \| \
7989 <         .     : '\(.\)' 2>/dev/null ||
7990 < echo X/"$0" |
7991 <    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
7992 <          /^X\/\(\/\/\)$/{ s//\1/; q; }
7993 <          /^X\/\(\/\).*/{ s//\1/; q; }
7994 <          s/.*/./; q'`
9359 > fi
9360  
9361 +     ;;
9362 + esac
9363  
7997 # PATH needs CR, and LINENO needs CR and PATH.
7998 # Avoid depending upon Character Ranges.
7999 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
8000 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
8001 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
8002 as_cr_digits='0123456789'
8003 as_cr_alnum=$as_cr_Letters$as_cr_digits
9364  
9365 < # The user is always right.
9366 < if test "${PATH_SEPARATOR+set}" != set; then
9367 <  echo "#! /bin/sh" >conf$$.sh
8008 <  echo  "exit 0"   >>conf$$.sh
8009 <  chmod +x conf$$.sh
8010 <  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8011 <    PATH_SEPARATOR=';'
8012 <  else
8013 <    PATH_SEPARATOR=:
8014 <  fi
8015 <  rm -f conf$$.sh
9365 > # Check whether --enable-doxygen was given.
9366 > if test "${enable_doxygen+set}" = set; then :
9367 >  enableval=$enable_doxygen;
9368   fi
9369  
9370 + # Check whether --enable-dot was given.
9371 + if test "${enable_dot+set}" = set; then :
9372 +  enableval=$enable_dot;
9373 + fi
9374  
9375 <  as_lineno_1=$LINENO
9376 <  as_lineno_2=$LINENO
9377 <  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
9378 <  test "x$as_lineno_1" != "x$as_lineno_2" &&
9379 <  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
9380 <  # Find who we are.  Look in the path if we contain no path at all
9381 <  # relative or not.
9382 <  case $0 in
9383 <    *[\\/]* ) as_myself=$0 ;;
9384 <    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9375 > # Check whether --enable-html-docs was given.
9376 > if test "${enable_html_docs+set}" = set; then :
9377 >  enableval=$enable_html_docs;
9378 > else
9379 >   enable_html_docs=yes
9380 > fi
9381 >
9382 > # Check whether --enable-latex-docs was given.
9383 > if test "${enable_latex_docs+set}" = set; then :
9384 >  enableval=$enable_latex_docs;
9385 > else
9386 >   enable_latex_docs=no
9387 > fi
9388 >
9389 > if test "x$enable_doxygen" = xno; then
9390 >        enable_doc=no
9391 > else
9392 >        # Extract the first word of "doxygen", so it can be a program name with args.
9393 > set dummy doxygen; ac_word=$2
9394 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9395 > $as_echo_n "checking for $ac_word... " >&6; }
9396 > if test "${ac_cv_path_DOXYGEN+set}" = set; then :
9397 >  $as_echo_n "(cached) " >&6
9398 > else
9399 >  case $DOXYGEN in
9400 >  [\\/]* | ?:[\\/]*)
9401 >  ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
9402 >  ;;
9403 >  *)
9404 >  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9405   for as_dir in $PATH
9406   do
9407    IFS=$as_save_IFS
9408    test -z "$as_dir" && as_dir=.
9409 <  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9410 < done
9411 <
9412 <       ;;
9413 <  esac
8038 <  # We did not find ourselves, most probably we were run as `sh COMMAND'
8039 <  # in which case we are not to be found in the path.
8040 <  if test "x$as_myself" = x; then
8041 <    as_myself=$0
9409 >    for ac_exec_ext in '' $ac_executable_extensions; do
9410 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9411 >    ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext"
9412 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9413 >    break 2
9414    fi
9415 <  if test ! -f "$as_myself"; then
9416 <    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
9417 < echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
9418 <   { (exit 1); exit 1; }; }
9419 <  fi
9420 <  case $CONFIG_SHELL in
9421 <  '')
9422 <    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9423 < for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
9415 > done
9416 >  done
9417 > IFS=$as_save_IFS
9418 >
9419 >  ;;
9420 > esac
9421 > fi
9422 > DOXYGEN=$ac_cv_path_DOXYGEN
9423 > if test -n "$DOXYGEN"; then
9424 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
9425 > $as_echo "$DOXYGEN" >&6; }
9426 > else
9427 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428 > $as_echo "no" >&6; }
9429 > fi
9430 >
9431 >
9432 >        if test "x$DOXYGEN" = x; then
9433 >                if test "x$enable_doxygen" = xyes; then
9434 >                        as_fn_error "could not find doxygen" "$LINENO" 5
9435 >                fi
9436 >                enable_doc=no
9437 >        else
9438 >                enable_doc=yes
9439 >                # Extract the first word of "dot", so it can be a program name with args.
9440 > set dummy dot; ac_word=$2
9441 > { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9442 > $as_echo_n "checking for $ac_word... " >&6; }
9443 > if test "${ac_cv_path_DOT+set}" = set; then :
9444 >  $as_echo_n "(cached) " >&6
9445 > else
9446 >  case $DOT in
9447 >  [\\/]* | ?:[\\/]*)
9448 >  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
9449 >  ;;
9450 >  *)
9451 >  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9452 > for as_dir in $PATH
9453   do
9454    IFS=$as_save_IFS
9455    test -z "$as_dir" && as_dir=.
9456 <  for as_base in sh bash ksh sh5; do
9457 <         case $as_dir in
9458 <         /*)
9459 <           if ("$as_dir/$as_base" -c '
9460 <  as_lineno_1=$LINENO
9461 <  as_lineno_2=$LINENO
8061 <  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8062 <  test "x$as_lineno_1" != "x$as_lineno_2" &&
8063 <  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
8064 <             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
8065 <             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
8066 <             CONFIG_SHELL=$as_dir/$as_base
8067 <             export CONFIG_SHELL
8068 <             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
8069 <           fi;;
8070 <         esac
8071 <       done
9456 >    for ac_exec_ext in '' $ac_executable_extensions; do
9457 >  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9458 >    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
9459 >    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9460 >    break 2
9461 >  fi
9462   done
9463 < ;;
9464 <  esac
9463 >  done
9464 > IFS=$as_save_IFS
9465  
9466 <  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
9467 <  # uniformly replaced by the line number.  The first 'sed' inserts a
9468 <  # line-number line before each line; the second 'sed' does the real
9469 <  # work.  The second script uses 'N' to pair each line-number line
9470 <  # with the numbered line, and appends trailing '-' during
9471 <  # substitution so that $LINENO is not a special case at line end.
9472 <  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
9473 <  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
9474 <  sed '=' <$as_myself |
9475 <    sed '
9476 <      N
8087 <      s,$,-,
8088 <      : loop
8089 <      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
8090 <      t loop
8091 <      s,-$,,
8092 <      s,^['$as_cr_digits']*\n,,
8093 <    ' >$as_me.lineno &&
8094 <  chmod +x $as_me.lineno ||
8095 <    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
8096 < echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
8097 <   { (exit 1); exit 1; }; }
9466 >  ;;
9467 > esac
9468 > fi
9469 > DOT=$ac_cv_path_DOT
9470 > if test -n "$DOT"; then
9471 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
9472 > $as_echo "$DOT" >&6; }
9473 > else
9474 >  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9475 > $as_echo "no" >&6; }
9476 > fi
9477  
8099  # Don't try to exec as it changes $[0], causing all sort of problems
8100  # (the dirname of $[0] is not the place where we might find the
8101  # original and so on.  Autoconf is especially sensible to this).
8102  . ./$as_me.lineno
8103  # Exit status is that of the last command.
8104  exit
8105 }
9478  
9479 +        fi
9480 + fi
9481  
9482 < case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
9483 <  *c*,-n*) ECHO_N= ECHO_C='
9484 < ' ECHO_T='      ' ;;
9485 <  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
9486 <  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
9482 > if test "x$enable_doc" = xyes; then
9483 >  DOC=1
9484 > else
9485 >  DOC=0
9486 > fi
9487 >
9488 >
9489 > if test x$DOT = x; then
9490 >        if test "x$enable_dot" = xyes; then
9491 >                as_fn_error "could not find dot" "$LINENO" 5
9492 >        fi
9493 >        enable_dot=no
9494 > else
9495 >        enable_dot=yes
9496 > fi
9497 >
9498 >
9499 >
9500 >
9501 >
9502 >
9503 >
9504 >
9505 >
9506 >
9507 >
9508 >
9509 >
9510 >
9511 >
9512 >
9513 >
9514 >
9515 >
9516 > ac_config_files="$ac_config_files make/Makefile src/utils/Makefile src/math/Makefile src/integrators/Makefile src/applications/atom2md/Makefile scripts/filepp"
9517 >
9518 >
9519 > cat >confcache <<\_ACEOF
9520 > # This file is a shell script that caches the results of configure
9521 > # tests run on this system so they can be shared between configure
9522 > # scripts and configure runs, see configure's option --config-cache.
9523 > # It is not useful on other systems.  If it contains results you don't
9524 > # want to keep, you may remove or edit it.
9525 > #
9526 > # config.status only pays attention to the cache file if you give it
9527 > # the --recheck option to rerun configure.
9528 > #
9529 > # `ac_cv_env_foo' variables (set or unset) will be overridden when
9530 > # loading this file, other *unset* `ac_cv_foo' will be assigned the
9531 > # following values.
9532 >
9533 > _ACEOF
9534 >
9535 > # The following way of writing the cache mishandles newlines in values,
9536 > # but we know of no workaround that is simple, portable, and efficient.
9537 > # So, we kill variables containing newlines.
9538 > # Ultrix sh set writes to stderr and can't be redirected directly,
9539 > # and sets the high bit in the cache file unless we assign to the vars.
9540 > (
9541 >  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
9542 >    eval ac_val=\$$ac_var
9543 >    case $ac_val in #(
9544 >    *${as_nl}*)
9545 >      case $ac_var in #(
9546 >      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
9547 > $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
9548 >      esac
9549 >      case $ac_var in #(
9550 >      _ | IFS | as_nl) ;; #(
9551 >      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
9552 >      *) { eval $ac_var=; unset $ac_var;} ;;
9553 >      esac ;;
9554 >    esac
9555 >  done
9556 >
9557 >  (set) 2>&1 |
9558 >    case $as_nl`(ac_space=' '; set) 2>&1` in #(
9559 >    *${as_nl}ac_space=\ *)
9560 >      # `set' does not quote correctly, so add quotes: double-quote
9561 >      # substitution turns \\\\ into \\, and sed turns \\ into \.
9562 >      sed -n \
9563 >        "s/'/'\\\\''/g;
9564 >          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
9565 >      ;; #(
9566 >    *)
9567 >      # `set' quotes correctly as required by POSIX, so do not add quotes.
9568 >      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
9569 >      ;;
9570 >    esac |
9571 >    sort
9572 > ) |
9573 >  sed '
9574 >     /^ac_cv_env_/b end
9575 >     t clear
9576 >     :clear
9577 >     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9578 >     t end
9579 >     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9580 >     :end' >>confcache
9581 > if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
9582 >  if test -w "$cache_file"; then
9583 >    test "x$cache_file" != "x/dev/null" &&
9584 >      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
9585 > $as_echo "$as_me: updating cache $cache_file" >&6;}
9586 >    cat confcache >$cache_file
9587 >  else
9588 >    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
9589 > $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
9590 >  fi
9591 > fi
9592 > rm -f confcache
9593 >
9594 > test "x$prefix" = xNONE && prefix=$ac_default_prefix
9595 > # Let make expand exec_prefix.
9596 > test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9597 >
9598 > DEFS=-DHAVE_CONFIG_H
9599 >
9600 > ac_libobjs=
9601 > ac_ltlibobjs=
9602 > for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9603 >  # 1. Remove the extension, and $U if already installed.
9604 >  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
9605 >  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
9606 >  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
9607 >  #    will be set to the directory where LIBOBJS objects are built.
9608 >  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
9609 >  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
9610 > done
9611 > LIBOBJS=$ac_libobjs
9612 >
9613 > LTLIBOBJS=$ac_ltlibobjs
9614 >
9615 >
9616 >
9617 > : ${CONFIG_STATUS=./config.status}
9618 > ac_write_fail=0
9619 > ac_clean_files_save=$ac_clean_files
9620 > ac_clean_files="$ac_clean_files $CONFIG_STATUS"
9621 > { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
9622 > $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
9623 > as_write_fail=0
9624 > cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
9625 > #! $SHELL
9626 > # Generated by $as_me.
9627 > # Run this file to recreate the current configuration.
9628 > # Compiler output produced by configure, useful for debugging
9629 > # configure, is in config.log if it exists.
9630 >
9631 > debug=false
9632 > ac_cs_recheck=false
9633 > ac_cs_silent=false
9634 >
9635 > SHELL=\${CONFIG_SHELL-$SHELL}
9636 > export SHELL
9637 > _ASEOF
9638 > cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
9639 > ## -------------------- ##
9640 > ## M4sh Initialization. ##
9641 > ## -------------------- ##
9642 >
9643 > # Be more Bourne compatible
9644 > DUALCASE=1; export DUALCASE # for MKS sh
9645 > if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
9646 >  emulate sh
9647 >  NULLCMD=:
9648 >  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
9649 >  # is contrary to our usage.  Disable this feature.
9650 >  alias -g '${1+"$@"}'='"$@"'
9651 >  setopt NO_GLOB_SUBST
9652 > else
9653 >  case `(set -o) 2>/dev/null` in #(
9654 >  *posix*) :
9655 >    set -o posix ;; #(
9656 >  *) :
9657 >     ;;
9658   esac
9659 + fi
9660  
9661 < if expr a : '\(a\)' >/dev/null 2>&1; then
9661 >
9662 > as_nl='
9663 > '
9664 > export as_nl
9665 > # Printing a long string crashes Solaris 7 /usr/bin/printf.
9666 > as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
9667 > as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
9668 > as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
9669 > # Prefer a ksh shell builtin over an external printf program on Solaris,
9670 > # but without wasting forks for bash or zsh.
9671 > if test -z "$BASH_VERSION$ZSH_VERSION" \
9672 >    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
9673 >  as_echo='print -r --'
9674 >  as_echo_n='print -rn --'
9675 > elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
9676 >  as_echo='printf %s\n'
9677 >  as_echo_n='printf %s'
9678 > else
9679 >  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
9680 >    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
9681 >    as_echo_n='/usr/ucb/echo -n'
9682 >  else
9683 >    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
9684 >    as_echo_n_body='eval
9685 >      arg=$1;
9686 >      case $arg in #(
9687 >      *"$as_nl"*)
9688 >        expr "X$arg" : "X\\(.*\\)$as_nl";
9689 >        arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
9690 >      esac;
9691 >      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
9692 >    '
9693 >    export as_echo_n_body
9694 >    as_echo_n='sh -c $as_echo_n_body as_echo'
9695 >  fi
9696 >  export as_echo_body
9697 >  as_echo='sh -c $as_echo_body as_echo'
9698 > fi
9699 >
9700 > # The user is always right.
9701 > if test "${PATH_SEPARATOR+set}" != set; then
9702 >  PATH_SEPARATOR=:
9703 >  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9704 >    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9705 >      PATH_SEPARATOR=';'
9706 >  }
9707 > fi
9708 >
9709 >
9710 > # IFS
9711 > # We need space, tab and new line, in precisely that order.  Quoting is
9712 > # there to prevent editors from complaining about space-tab.
9713 > # (If _AS_PATH_WALK were called with IFS unset, it would disable word
9714 > # splitting by setting IFS to empty value.)
9715 > IFS=" ""        $as_nl"
9716 >
9717 > # Find who we are.  Look in the path if we contain no directory separator.
9718 > case $0 in #((
9719 >  *[\\/]* ) as_myself=$0 ;;
9720 >  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9721 > for as_dir in $PATH
9722 > do
9723 >  IFS=$as_save_IFS
9724 >  test -z "$as_dir" && as_dir=.
9725 >    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9726 >  done
9727 > IFS=$as_save_IFS
9728 >
9729 >     ;;
9730 > esac
9731 > # We did not find ourselves, most probably we were run as `sh COMMAND'
9732 > # in which case we are not to be found in the path.
9733 > if test "x$as_myself" = x; then
9734 >  as_myself=$0
9735 > fi
9736 > if test ! -f "$as_myself"; then
9737 >  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
9738 >  exit 1
9739 > fi
9740 >
9741 > # Unset variables that we do not need and which cause bugs (e.g. in
9742 > # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
9743 > # suppresses any "Segmentation fault" message there.  '((' could
9744 > # trigger a bug in pdksh 5.2.14.
9745 > for as_var in BASH_ENV ENV MAIL MAILPATH
9746 > do eval test x\${$as_var+set} = xset \
9747 >  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
9748 > done
9749 > PS1='$ '
9750 > PS2='> '
9751 > PS4='+ '
9752 >
9753 > # NLS nuisances.
9754 > LC_ALL=C
9755 > export LC_ALL
9756 > LANGUAGE=C
9757 > export LANGUAGE
9758 >
9759 > # CDPATH.
9760 > (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9761 >
9762 >
9763 > # as_fn_error ERROR [LINENO LOG_FD]
9764 > # ---------------------------------
9765 > # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9766 > # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9767 > # script with status $?, using 1 if that was 0.
9768 > as_fn_error ()
9769 > {
9770 >  as_status=$?; test $as_status -eq 0 && as_status=1
9771 >  if test "$3"; then
9772 >    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9773 >    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
9774 >  fi
9775 >  $as_echo "$as_me: error: $1" >&2
9776 >  as_fn_exit $as_status
9777 > } # as_fn_error
9778 >
9779 >
9780 > # as_fn_set_status STATUS
9781 > # -----------------------
9782 > # Set $? to STATUS, without forking.
9783 > as_fn_set_status ()
9784 > {
9785 >  return $1
9786 > } # as_fn_set_status
9787 >
9788 > # as_fn_exit STATUS
9789 > # -----------------
9790 > # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9791 > as_fn_exit ()
9792 > {
9793 >  set +e
9794 >  as_fn_set_status $1
9795 >  exit $1
9796 > } # as_fn_exit
9797 >
9798 > # as_fn_unset VAR
9799 > # ---------------
9800 > # Portably unset VAR.
9801 > as_fn_unset ()
9802 > {
9803 >  { eval $1=; unset $1;}
9804 > }
9805 > as_unset=as_fn_unset
9806 > # as_fn_append VAR VALUE
9807 > # ----------------------
9808 > # Append the text in VALUE to the end of the definition contained in VAR. Take
9809 > # advantage of any shell optimizations that allow amortized linear growth over
9810 > # repeated appends, instead of the typical quadratic growth present in naive
9811 > # implementations.
9812 > if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
9813 >  eval 'as_fn_append ()
9814 >  {
9815 >    eval $1+=\$2
9816 >  }'
9817 > else
9818 >  as_fn_append ()
9819 >  {
9820 >    eval $1=\$$1\$2
9821 >  }
9822 > fi # as_fn_append
9823 >
9824 > # as_fn_arith ARG...
9825 > # ------------------
9826 > # Perform arithmetic evaluation on the ARGs, and store the result in the
9827 > # global $as_val. Take advantage of shells that can avoid forks. The arguments
9828 > # must be portable across $(()) and expr.
9829 > if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
9830 >  eval 'as_fn_arith ()
9831 >  {
9832 >    as_val=$(( $* ))
9833 >  }'
9834 > else
9835 >  as_fn_arith ()
9836 >  {
9837 >    as_val=`expr "$@" || test $? -eq 1`
9838 >  }
9839 > fi # as_fn_arith
9840 >
9841 >
9842 > if expr a : '\(a\)' >/dev/null 2>&1 &&
9843 >   test "X`expr 00001 : '.*\(...\)'`" = X001; then
9844    as_expr=expr
9845   else
9846    as_expr=false
9847   fi
9848  
9849 + if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
9850 +  as_basename=basename
9851 + else
9852 +  as_basename=false
9853 + fi
9854 +
9855 + if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9856 +  as_dirname=dirname
9857 + else
9858 +  as_dirname=false
9859 + fi
9860 +
9861 + as_me=`$as_basename -- "$0" ||
9862 + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9863 +         X"$0" : 'X\(//\)$' \| \
9864 +         X"$0" : 'X\(/\)' \| . 2>/dev/null ||
9865 + $as_echo X/"$0" |
9866 +    sed '/^.*\/\([^/][^/]*\)\/*$/{
9867 +            s//\1/
9868 +            q
9869 +          }
9870 +          /^X\/\(\/\/\)$/{
9871 +            s//\1/
9872 +            q
9873 +          }
9874 +          /^X\/\(\/\).*/{
9875 +            s//\1/
9876 +            q
9877 +          }
9878 +          s/.*/./; q'`
9879 +
9880 + # Avoid depending upon Character Ranges.
9881 + as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9882 + as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9883 + as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9884 + as_cr_digits='0123456789'
9885 + as_cr_alnum=$as_cr_Letters$as_cr_digits
9886 +
9887 + ECHO_C= ECHO_N= ECHO_T=
9888 + case `echo -n x` in #(((((
9889 + -n*)
9890 +  case `echo 'xy\c'` in
9891 +  *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
9892 +  xy)  ECHO_C='\c';;
9893 +  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
9894 +       ECHO_T=' ';;
9895 +  esac;;
9896 + *)
9897 +  ECHO_N='-n';;
9898 + esac
9899 +
9900   rm -f conf$$ conf$$.exe conf$$.file
9901 < echo >conf$$.file
9902 < if ln -s conf$$.file conf$$ 2>/dev/null; then
9903 <  # We could just check for DJGPP; but this test a) works b) is more generic
9904 <  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
9905 <  if test -f conf$$.exe; then
9906 <    # Don't use ln at all; we don't have any links
9907 <    as_ln_s='cp -p'
9908 <  else
9901 > if test -d conf$$.dir; then
9902 >  rm -f conf$$.dir/conf$$.file
9903 > else
9904 >  rm -f conf$$.dir
9905 >  mkdir conf$$.dir 2>/dev/null
9906 > fi
9907 > if (echo >conf$$.file) 2>/dev/null; then
9908 >  if ln -s conf$$.file conf$$ 2>/dev/null; then
9909      as_ln_s='ln -s'
9910 +    # ... but there are two gotchas:
9911 +    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
9912 +    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
9913 +    # In both cases, we have to default to `cp -p'.
9914 +    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
9915 +      as_ln_s='cp -p'
9916 +  elif ln conf$$.file conf$$ 2>/dev/null; then
9917 +    as_ln_s=ln
9918 +  else
9919 +    as_ln_s='cp -p'
9920    fi
8132 elif ln conf$$.file conf$$ 2>/dev/null; then
8133  as_ln_s=ln
9921   else
9922    as_ln_s='cp -p'
9923   fi
9924 < rm -f conf$$ conf$$.exe conf$$.file
9924 > rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9925 > rmdir conf$$.dir 2>/dev/null
9926  
9927 +
9928 + # as_fn_mkdir_p
9929 + # -------------
9930 + # Create "$as_dir" as a directory, including parents if necessary.
9931 + as_fn_mkdir_p ()
9932 + {
9933 +
9934 +  case $as_dir in #(
9935 +  -*) as_dir=./$as_dir;;
9936 +  esac
9937 +  test -d "$as_dir" || eval $as_mkdir_p || {
9938 +    as_dirs=
9939 +    while :; do
9940 +      case $as_dir in #(
9941 +      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
9942 +      *) as_qdir=$as_dir;;
9943 +      esac
9944 +      as_dirs="'$as_qdir' $as_dirs"
9945 +      as_dir=`$as_dirname -- "$as_dir" ||
9946 + $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9947 +         X"$as_dir" : 'X\(//\)[^/]' \| \
9948 +         X"$as_dir" : 'X\(//\)$' \| \
9949 +         X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
9950 + $as_echo X"$as_dir" |
9951 +    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9952 +            s//\1/
9953 +            q
9954 +          }
9955 +          /^X\(\/\/\)[^/].*/{
9956 +            s//\1/
9957 +            q
9958 +          }
9959 +          /^X\(\/\/\)$/{
9960 +            s//\1/
9961 +            q
9962 +          }
9963 +          /^X\(\/\).*/{
9964 +            s//\1/
9965 +            q
9966 +          }
9967 +          s/.*/./; q'`
9968 +      test -d "$as_dir" && break
9969 +    done
9970 +    test -z "$as_dirs" || eval "mkdir $as_dirs"
9971 +  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
9972 +
9973 +
9974 + } # as_fn_mkdir_p
9975   if mkdir -p . 2>/dev/null; then
9976 <  as_mkdir_p=:
9976 >  as_mkdir_p='mkdir -p "$as_dir"'
9977   else
9978    test -d ./-p && rmdir ./-p
9979    as_mkdir_p=false
9980   fi
9981  
9982 < as_executable_p="test -f"
9982 > if test -x / >/dev/null 2>&1; then
9983 >  as_test_x='test -x'
9984 > else
9985 >  if ls -dL / >/dev/null 2>&1; then
9986 >    as_ls_L_option=L
9987 >  else
9988 >    as_ls_L_option=
9989 >  fi
9990 >  as_test_x='
9991 >    eval sh -c '\''
9992 >      if test -d "$1"; then
9993 >        test -d "$1/.";
9994 >      else
9995 >        case $1 in #(
9996 >        -*)set "./$1";;
9997 >        esac;
9998 >        case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
9999 >        ???[sx]*):;;*)false;;esac;fi
10000 >    '\'' sh
10001 >  '
10002 > fi
10003 > as_executable_p=$as_test_x
10004  
10005   # Sed expression to map a string onto a valid CPP name.
10006   as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Line 8152 | Line 10009 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
10009   as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
10010  
10011  
8155 # IFS
8156 # We need space, tab and new line, in precisely that order.
8157 as_nl='
8158 '
8159 IFS="   $as_nl"
8160
8161 # CDPATH.
8162 $as_unset CDPATH
8163
10012   exec 6>&1
10013 + ## ----------------------------------- ##
10014 + ## Main body of $CONFIG_STATUS script. ##
10015 + ## ----------------------------------- ##
10016 + _ASEOF
10017 + test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
10018  
10019 < # Open the log real soon, to keep \$[0] and so on meaningful, and to
10019 > cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10020 > # Save the log message, to keep $0 and so on meaningful, and to
10021   # report actual input values of CONFIG_FILES etc. instead of their
10022 < # values after options handling.  Logging --version etc. is OK.
10023 < exec 5>>config.log
10024 < {
10025 <  echo
8172 <  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
8173 < ## Running $as_me. ##
8174 < _ASBOX
8175 < } >&5
8176 < cat >&5 <<_CSEOF
10022 > # values after options handling.
10023 > ac_log="
10024 > This file was extended by OpenMD $as_me 1.0, which was
10025 > generated by GNU Autoconf 2.65.  Invocation command line was
10026  
8178 This file was extended by OOPSE $as_me 2.0, which was
8179 generated by GNU Autoconf 2.59.  Invocation command line was
8180
10027    CONFIG_FILES    = $CONFIG_FILES
10028    CONFIG_HEADERS  = $CONFIG_HEADERS
10029    CONFIG_LINKS    = $CONFIG_LINKS
10030    CONFIG_COMMANDS = $CONFIG_COMMANDS
10031    $ $0 $@
10032  
10033 < _CSEOF
10034 < echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
10035 < echo >&5
10033 > on `(hostname || uname -n) 2>/dev/null | sed 1q`
10034 > "
10035 >
10036   _ACEOF
10037  
10038 < # Files that config.status was made for.
10039 < if test -n "$ac_config_files"; then
10040 <  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
8195 < fi
10038 > case $ac_config_files in *"
10039 > "*) set x $ac_config_files; shift; ac_config_files=$*;;
10040 > esac
10041  
10042 < if test -n "$ac_config_headers"; then
10043 <  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
10044 < fi
10042 > case $ac_config_headers in *"
10043 > "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
10044 > esac
10045  
8201 if test -n "$ac_config_links"; then
8202  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
8203 fi
10046  
10047 < if test -n "$ac_config_commands"; then
10048 <  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
10049 < fi
10047 > cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10048 > # Files that config.status was made for.
10049 > config_files="$ac_config_files"
10050 > config_headers="$ac_config_headers"
10051  
10052 < cat >>$CONFIG_STATUS <<\_ACEOF
10052 > _ACEOF
10053  
10054 + cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10055   ac_cs_usage="\
10056 < \`$as_me' instantiates files from templates according to the
10057 < current configuration.
10056 > \`$as_me' instantiates files and other configuration actions
10057 > from templates according to the current configuration.  Unless the files
10058 > and actions are specified as TAGs, all are instantiated by default.
10059  
10060 < Usage: $0 [OPTIONS] [FILE]...
10060 > Usage: $0 [OPTION]... [TAG]...
10061  
10062    -h, --help       print this help, then exit
10063 <  -V, --version    print version number, then exit
10064 <  -q, --quiet      do not print progress messages
10063 >  -V, --version    print version number and configuration settings, then exit
10064 >      --config     print configuration, then exit
10065 >  -q, --quiet, --silent
10066 >                   do not print progress messages
10067    -d, --debug      don't remove temporary files
10068        --recheck    update $as_me by reconfiguring in the same conditions
10069 <  --file=FILE[:TEMPLATE]
10070 <                   instantiate the configuration file FILE
10071 <  --header=FILE[:TEMPLATE]
10072 <                   instantiate the configuration header FILE
10069 >      --file=FILE[:TEMPLATE]
10070 >                   instantiate the configuration file FILE
10071 >      --header=FILE[:TEMPLATE]
10072 >                   instantiate the configuration header FILE
10073  
10074   Configuration files:
10075   $config_files
# Line 8230 | Line 10077 | $config_headers
10077   Configuration headers:
10078   $config_headers
10079  
10080 < Configuration links:
8234 < $config_links
10080 > Report bugs to <gezelter@nd.edu>."
10081  
8236 Report bugs to <bug-autoconf@gnu.org>."
10082   _ACEOF
10083 <
10084 < cat >>$CONFIG_STATUS <<_ACEOF
10083 > cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10084 > ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
10085   ac_cs_version="\\
10086 < OOPSE config.status 2.0
10087 < configured by $0, generated by GNU Autoconf 2.59,
10088 <  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
10086 > OpenMD config.status 1.0
10087 > configured by $0, generated by GNU Autoconf 2.65,
10088 >  with options \\"\$ac_cs_config\\"
10089  
10090 < Copyright (C) 2003 Free Software Foundation, Inc.
10090 > Copyright (C) 2009 Free Software Foundation, Inc.
10091   This config.status script is free software; the Free Software Foundation
10092   gives unlimited permission to copy, distribute and modify it."
10093 < srcdir=$srcdir
10094 < INSTALL="$INSTALL"
10093 >
10094 > ac_pwd='$ac_pwd'
10095 > srcdir='$srcdir'
10096 > INSTALL='$INSTALL'
10097 > test -n "\$AWK" || AWK=awk
10098   _ACEOF
10099  
10100 < cat >>$CONFIG_STATUS <<\_ACEOF
10101 < # If no file are specified by the user, then we need to provide default
8254 < # value.  By we need to know if files were specified by the user.
10100 > cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10101 > # The default lists apply if the user does not specify any file.
10102   ac_need_defaults=:
10103   while test $# != 0
10104   do
10105    case $1 in
10106    --*=*)
10107 <    ac_option=`expr "x$1" : 'x\([^=]*\)='`
10108 <    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
10107 >    ac_option=`expr "X$1" : 'X\([^=]*\)='`
10108 >    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
10109      ac_shift=:
10110      ;;
10111 <  -*)
10111 >  *)
10112      ac_option=$1
10113      ac_optarg=$2
10114      ac_shift=shift
10115      ;;
8269  *) # This is not an option, so the user has probably given explicit
8270     # arguments.
8271     ac_option=$1
8272     ac_need_defaults=false;;
10116    esac
10117  
10118    case $ac_option in
10119    # Handling of the options.
8277 _ACEOF
8278 cat >>$CONFIG_STATUS <<\_ACEOF
10120    -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10121      ac_cs_recheck=: ;;
10122 <  --version | --vers* | -V )
10123 <    echo "$ac_cs_version"; exit 0 ;;
10124 <  --he | --h)
10125 <    # Conflict between --help and --header
10126 <    { { echo "$as_me:$LINENO: error: ambiguous option: $1
8286 < Try \`$0 --help' for more information." >&5
8287 < echo "$as_me: error: ambiguous option: $1
8288 < Try \`$0 --help' for more information." >&2;}
8289 <   { (exit 1); exit 1; }; };;
8290 <  --help | --hel | -h )
8291 <    echo "$ac_cs_usage"; exit 0 ;;
8292 <  --debug | --d* | -d )
10122 >  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
10123 >    $as_echo "$ac_cs_version"; exit ;;
10124 >  --config | --confi | --conf | --con | --co | --c )
10125 >    $as_echo "$ac_cs_config"; exit ;;
10126 >  --debug | --debu | --deb | --de | --d | -d )
10127      debug=: ;;
10128    --file | --fil | --fi | --f )
10129      $ac_shift
10130 <    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
10130 >    case $ac_optarg in
10131 >    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
10132 >    esac
10133 >    as_fn_append CONFIG_FILES " '$ac_optarg'"
10134      ac_need_defaults=false;;
10135    --header | --heade | --head | --hea )
10136      $ac_shift
10137 <    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
10137 >    case $ac_optarg in
10138 >    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
10139 >    esac
10140 >    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
10141      ac_need_defaults=false;;
10142 +  --he | --h)
10143 +    # Conflict between --help and --header
10144 +    as_fn_error "ambiguous option: \`$1'
10145 + Try \`$0 --help' for more information.";;
10146 +  --help | --hel | -h )
10147 +    $as_echo "$ac_cs_usage"; exit ;;
10148    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
10149    | -silent | --silent | --silen | --sile | --sil | --si | --s)
10150      ac_cs_silent=: ;;
10151  
10152    # This is an error.
10153 <  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
10154 < Try \`$0 --help' for more information." >&5
8309 < echo "$as_me: error: unrecognized option: $1
8310 < Try \`$0 --help' for more information." >&2;}
8311 <   { (exit 1); exit 1; }; } ;;
10153 >  -*) as_fn_error "unrecognized option: \`$1'
10154 > Try \`$0 --help' for more information." ;;
10155  
10156 <  *) ac_config_targets="$ac_config_targets $1" ;;
10156 >  *) as_fn_append ac_config_targets " $1"
10157 >     ac_need_defaults=false ;;
10158  
10159    esac
10160    shift
# Line 8324 | Line 10168 | _ACEOF
10168   fi
10169  
10170   _ACEOF
10171 < cat >>$CONFIG_STATUS <<_ACEOF
10171 > cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10172   if \$ac_cs_recheck; then
10173 <  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
10174 <  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
10173 >  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
10174 >  shift
10175 >  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
10176 >  CONFIG_SHELL='$SHELL'
10177 >  export CONFIG_SHELL
10178 >  exec "\$@"
10179   fi
10180  
10181   _ACEOF
10182 + cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10183 + exec 5>>config.log
10184 + {
10185 +  echo
10186 +  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
10187 + ## Running $as_me. ##
10188 + _ASBOX
10189 +  $as_echo "$ac_log"
10190 + } >&5
10191  
10192 + _ACEOF
10193 + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10194 + _ACEOF
10195  
10196 + cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10197  
10198 <
8338 <
8339 < cat >>$CONFIG_STATUS <<\_ACEOF
10198 > # Handling of arguments.
10199   for ac_config_target in $ac_config_targets
10200   do
10201 <  case "$ac_config_target" in
10202 <  # Handling of arguments.
10203 <  "make/Makefile" ) CONFIG_FILES="$CONFIG_FILES make/Makefile" ;;
10204 <  "utils/getopt.h" ) CONFIG_LINKS="$CONFIG_LINKS utils/getopt.h:utils/gnugetopt.h" ;;
10205 <  "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
10206 <  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
10207 < echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
10208 <   { (exit 1); exit 1; }; };;
10201 >  case $ac_config_target in
10202 >    "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
10203 >    "make/Makefile") CONFIG_FILES="$CONFIG_FILES make/Makefile" ;;
10204 >    "src/utils/Makefile") CONFIG_FILES="$CONFIG_FILES src/utils/Makefile" ;;
10205 >    "src/math/Makefile") CONFIG_FILES="$CONFIG_FILES src/math/Makefile" ;;
10206 >    "src/integrators/Makefile") CONFIG_FILES="$CONFIG_FILES src/integrators/Makefile" ;;
10207 >    "src/applications/atom2md/Makefile") CONFIG_FILES="$CONFIG_FILES src/applications/atom2md/Makefile" ;;
10208 >    "scripts/filepp") CONFIG_FILES="$CONFIG_FILES scripts/filepp" ;;
10209 >
10210 >  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
10211    esac
10212   done
10213  
10214 +
10215   # If the user did not use the arguments to specify the items to instantiate,
10216   # then the envvar interface is used.  Set only those that are not.
10217   # We use the long form for the default assignment because of an extremely
# Line 8357 | Line 10219 | if $ac_need_defaults; then
10219   if $ac_need_defaults; then
10220    test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
10221    test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
8360  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
10222   fi
10223  
10224   # Have a temporary directory for convenience.  Make it in the build tree
10225 < # simply because there is no reason to put it here, and in addition,
10225 > # simply because there is no reason against having it here, and in addition,
10226   # creating and moving files from /tmp can sometimes cause problems.
10227 < # Create a temporary directory, and hook for its removal unless debugging.
10227 > # Hook for its removal unless debugging.
10228 > # Note that there is a small window in which the directory will not be cleaned:
10229 > # after its creation but before its name has been assigned to `$tmp'.
10230   $debug ||
10231   {
10232 <  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
10233 <  trap '{ (exit 1); exit 1; }' 1 2 13 15
10232 >  tmp=
10233 >  trap 'exit_status=$?
10234 >  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
10235 > ' 0
10236 >  trap 'as_fn_exit 1' 1 2 13 15
10237   }
8372
10238   # Create a (secure) tmp directory for tmp files.
10239  
10240   {
10241 <  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
10241 >  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
10242    test -n "$tmp" && test -d "$tmp"
10243   }  ||
10244   {
10245 <  tmp=./confstat$$-$RANDOM
10246 <  (umask 077 && mkdir $tmp)
10247 < } ||
8383 < {
8384 <   echo "$me: cannot create a temporary directory in ." >&2
8385 <   { (exit 1); exit 1; }
8386 < }
10245 >  tmp=./conf$$-$RANDOM
10246 >  (umask 077 && mkdir "$tmp")
10247 > } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
10248  
10249 < _ACEOF
10249 > # Set up the scripts for CONFIG_FILES section.
10250 > # No need to generate them if there are no CONFIG_FILES.
10251 > # This happens for instance with `./config.status config.h'.
10252 > if test -n "$CONFIG_FILES"; then
10253  
8390 cat >>$CONFIG_STATUS <<_ACEOF
10254  
10255 < #
10256 < # CONFIG_FILES section.
10257 < #
10255 > ac_cr=`echo X | tr X '\015'`
10256 > # On cygwin, bash can eat \r inside `` if the user requested igncr.
10257 > # But we know of no other shell where ac_cr would be empty at this
10258 > # point, so we can use a bashism as a fallback.
10259 > if test "x$ac_cr" = x; then
10260 >  eval ac_cr=\$\'\\r\'
10261 > fi
10262 > ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
10263 > if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
10264 >  ac_cs_awk_cr='\r'
10265 > else
10266 >  ac_cs_awk_cr=$ac_cr
10267 > fi
10268  
10269 < # No need to generate the scripts if there are no CONFIG_FILES.
8397 < # This happens for instance when ./config.status config.h
8398 < if test -n "\$CONFIG_FILES"; then
8399 <  # Protect against being on the right side of a sed subst in config.status.
8400 <  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
8401 <   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
8402 < s,@SHELL@,$SHELL,;t t
8403 < s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
8404 < s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
8405 < s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
8406 < s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
8407 < s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
8408 < s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
8409 < s,@exec_prefix@,$exec_prefix,;t t
8410 < s,@prefix@,$prefix,;t t
8411 < s,@program_transform_name@,$program_transform_name,;t t
8412 < s,@bindir@,$bindir,;t t
8413 < s,@sbindir@,$sbindir,;t t
8414 < s,@libexecdir@,$libexecdir,;t t
8415 < s,@datadir@,$datadir,;t t
8416 < s,@sysconfdir@,$sysconfdir,;t t
8417 < s,@sharedstatedir@,$sharedstatedir,;t t
8418 < s,@localstatedir@,$localstatedir,;t t
8419 < s,@libdir@,$libdir,;t t
8420 < s,@includedir@,$includedir,;t t
8421 < s,@oldincludedir@,$oldincludedir,;t t
8422 < s,@infodir@,$infodir,;t t
8423 < s,@mandir@,$mandir,;t t
8424 < s,@build_alias@,$build_alias,;t t
8425 < s,@host_alias@,$host_alias,;t t
8426 < s,@target_alias@,$target_alias,;t t
8427 < s,@DEFS@,$DEFS,;t t
8428 < s,@ECHO_C@,$ECHO_C,;t t
8429 < s,@ECHO_N@,$ECHO_N,;t t
8430 < s,@ECHO_T@,$ECHO_T,;t t
8431 < s,@LIBS@,$LIBS,;t t
8432 < s,@PROGNAME@,$PROGNAME,;t t
8433 < s,@debug@,$debug,;t t
8434 < s,@build@,$build,;t t
8435 < s,@build_cpu@,$build_cpu,;t t
8436 < s,@build_vendor@,$build_vendor,;t t
8437 < s,@build_os@,$build_os,;t t
8438 < s,@host@,$host,;t t
8439 < s,@host_cpu@,$host_cpu,;t t
8440 < s,@host_vendor@,$host_vendor,;t t
8441 < s,@host_os@,$host_os,;t t
8442 < s,@CC@,$CC,;t t
8443 < s,@CFLAGS@,$CFLAGS,;t t
8444 < s,@LDFLAGS@,$LDFLAGS,;t t
8445 < s,@CPPFLAGS@,$CPPFLAGS,;t t
8446 < s,@ac_ct_CC@,$ac_ct_CC,;t t
8447 < s,@EXEEXT@,$EXEEXT,;t t
8448 < s,@OBJEXT@,$OBJEXT,;t t
8449 < s,@CXX@,$CXX,;t t
8450 < s,@CXXFLAGS@,$CXXFLAGS,;t t
8451 < s,@ac_ct_CXX@,$ac_ct_CXX,;t t
8452 < s,@OOPSE_TEMPLATE_FLAGS@,$OOPSE_TEMPLATE_FLAGS,;t t
8453 < s,@EXTRA_CC_FLAG@,$EXTRA_CC_FLAG,;t t
8454 < s,@F90@,$F90,;t t
8455 < s,@F90FLAGS@,$F90FLAGS,;t t
8456 < s,@ac_ct_F90@,$ac_ct_F90,;t t
8457 < s,@PREPFLAG@,$PREPFLAG,;t t
8458 < s,@PREPDEFFLAG@,$PREPDEFFLAG,;t t
8459 < s,@F90LIBS@,$F90LIBS,;t t
8460 < s,@F90_FUNC@,$F90_FUNC,;t t
8461 < s,@F90_FUNC_@,$F90_FUNC_,;t t
8462 < s,@MOD@,$MOD,;t t
8463 < s,@F90_WORK_FILES_ARG@,$F90_WORK_FILES_ARG,;t t
8464 < s,@MODDIRFLAG@,$MODDIRFLAG,;t t
8465 < s,@F90MODINCSPEC@,$F90MODINCSPEC,;t t
8466 < s,@F90_MODULE_NAMES@,$F90_MODULE_NAMES,;t t
8467 < s,@CPP@,$CPP,;t t
8468 < s,@EGREP@,$EGREP,;t t
8469 < s,@LIBOBJS@,$LIBOBJS,;t t
8470 < s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
8471 < s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
8472 < s,@INSTALL_DATA@,$INSTALL_DATA,;t t
8473 < s,@LN_S@,$LN_S,;t t
8474 < s,@SET_MAKE@,$SET_MAKE,;t t
8475 < s,@RANLIB@,$RANLIB,;t t
8476 < s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
8477 < s,@YACC@,$YACC,;t t
8478 < s,@LEX@,$LEX,;t t
8479 < s,@LEXLIB@,$LEXLIB,;t t
8480 < s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
8481 < s,@AR@,$AR,;t t
8482 < s,@MPI_LIB_DIR@,$MPI_LIB_DIR,;t t
8483 < s,@MPI_INC_DIR@,$MPI_INC_DIR,;t t
8484 < s,@MPI_F90_INC@,$MPI_F90_INC,;t t
8485 < s,@MPI_LIB@,$MPI_LIB,;t t
8486 < s,@MPI_F90_LIB@,$MPI_F90_LIB,;t t
8487 < s,@USE_MPI@,$USE_MPI,;t t
8488 < s,@SPRNG_LIB_DIR@,$SPRNG_LIB_DIR,;t t
8489 < s,@SPRNG_INC_DIR@,$SPRNG_INC_DIR,;t t
8490 < s,@SPRNG_LIB@,$SPRNG_LIB,;t t
8491 < s,@USE_SPRNG@,$USE_SPRNG,;t t
8492 < s,@MKL_LIBDIR@,$MKL_LIBDIR,;t t
8493 < s,@MKL_LIB@,$MKL_LIB,;t t
8494 < s,@MKL_INC@,$MKL_INC,;t t
8495 < s,@HAVE_MKL@,$HAVE_MKL,;t t
8496 < s,@BATEXT@,$BATEXT,;t t
8497 < s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
8498 < s,@OOPSE@,$OOPSE,;t t
8499 < s,@OOPSE_HOME@,$OOPSE_HOME,;t t
8500 < s,@SUBDIRS@,$SUBDIRS,;t t
8501 < s,@FFLAGS@,$FFLAGS,;t t
8502 < s,@LTLIBOBJS@,$LTLIBOBJS,;t t
8503 < CEOF
8504 <
10269 > echo 'BEGIN {' >"$tmp/subs1.awk" &&
10270   _ACEOF
10271  
10272 <  cat >>$CONFIG_STATUS <<\_ACEOF
10273 <  # Split the substitutions into bite-sized pieces for seds with
10274 <  # small command number limits, like on Digital OSF/1 and HP-UX.
10275 <  ac_max_sed_lines=48
10276 <  ac_sed_frag=1 # Number of current file.
10277 <  ac_beg=1 # First line for current file.
10278 <  ac_end=$ac_max_sed_lines # Line after last line for current file.
10279 <  ac_more_lines=:
10280 <  ac_sed_cmds=
10281 <  while $ac_more_lines; do
10282 <    if test $ac_beg -gt 1; then
10283 <      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
10284 <    else
10285 <      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
10286 <    fi
10287 <    if test ! -s $tmp/subs.frag; then
10288 <      ac_more_lines=false
10289 <    else
10290 <      # The purpose of the label and of the branching condition is to
10291 <      # speed up the sed processing (if there are no `@' at all, there
8527 <      # is no need to browse any of the substitutions).
8528 <      # These are the two extra sed commands mentioned above.
8529 <      (echo ':t
8530 <  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
8531 <      if test -z "$ac_sed_cmds"; then
8532 <        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
8533 <      else
8534 <        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
8535 <      fi
8536 <      ac_sed_frag=`expr $ac_sed_frag + 1`
8537 <      ac_beg=$ac_end
8538 <      ac_end=`expr $ac_end + $ac_max_sed_lines`
8539 <    fi
8540 <  done
8541 <  if test -z "$ac_sed_cmds"; then
8542 <    ac_sed_cmds=cat
10272 >
10273 > {
10274 >  echo "cat >conf$$subs.awk <<_ACEOF" &&
10275 >  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
10276 >  echo "_ACEOF"
10277 > } >conf$$subs.sh ||
10278 >  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
10279 > ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
10280 > ac_delim='%!_!# '
10281 > for ac_last_try in false false false false false :; do
10282 >  . ./conf$$subs.sh ||
10283 >    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
10284 >
10285 >  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
10286 >  if test $ac_delim_n = $ac_delim_num; then
10287 >    break
10288 >  elif $ac_last_try; then
10289 >    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
10290 >  else
10291 >    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10292    fi
10293 < fi # test -n "$CONFIG_FILES"
10293 > done
10294 > rm -f conf$$subs.sh
10295  
10296 + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10297 + cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
10298   _ACEOF
10299 < cat >>$CONFIG_STATUS <<\_ACEOF
10300 < for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
10301 <  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10302 <  case $ac_file in
10303 <  - | *:- | *:-:* ) # input from stdin
10304 <        cat >$tmp/stdin
10305 <        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
10306 <        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
10307 <  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
10308 <        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
10309 <  * )   ac_file_in=$ac_file.in ;;
10310 <  esac
10299 > sed -n '
10300 > h
10301 > s/^/S["/; s/!.*/"]=/
10302 > p
10303 > g
10304 > s/^[^!]*!//
10305 > :repl
10306 > t repl
10307 > s/'"$ac_delim"'$//
10308 > t delim
10309 > :nl
10310 > h
10311 > s/\(.\{148\}\)..*/\1/
10312 > t more1
10313 > s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
10314 > p
10315 > n
10316 > b repl
10317 > :more1
10318 > s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10319 > p
10320 > g
10321 > s/.\{148\}//
10322 > t nl
10323 > :delim
10324 > h
10325 > s/\(.\{148\}\)..*/\1/
10326 > t more2
10327 > s/["\\]/\\&/g; s/^/"/; s/$/"/
10328 > p
10329 > b
10330 > :more2
10331 > s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10332 > p
10333 > g
10334 > s/.\{148\}//
10335 > t delim
10336 > ' <conf$$subs.awk | sed '
10337 > /^[^""]/{
10338 >  N
10339 >  s/\n//
10340 > }
10341 > ' >>$CONFIG_STATUS || ac_write_fail=1
10342 > rm -f conf$$subs.awk
10343 > cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10344 > _ACAWK
10345 > cat >>"\$tmp/subs1.awk" <<_ACAWK &&
10346 >  for (key in S) S_is_set[key] = 1
10347 >  FS = ""
10348  
10349 <  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
10350 <  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
10351 < $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10352 <         X"$ac_file" : 'X\(//\)[^/]' \| \
10353 <         X"$ac_file" : 'X\(//\)$' \| \
10354 <         X"$ac_file" : 'X\(/\)' \| \
10355 <         .     : '\(.\)' 2>/dev/null ||
10356 < echo X"$ac_file" |
10357 <    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10358 <          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10359 <          /^X\(\/\/\)$/{ s//\1/; q; }
10360 <          /^X\(\/\).*/{ s//\1/; q; }
10361 <          s/.*/./; q'`
10362 <  { if $as_mkdir_p; then
10363 <    mkdir -p "$ac_dir"
10364 <  else
10365 <    as_dir="$ac_dir"
8577 <    as_dirs=
8578 <    while test ! -d "$as_dir"; do
8579 <      as_dirs="$as_dir $as_dirs"
8580 <      as_dir=`(dirname "$as_dir") 2>/dev/null ||
8581 < $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8582 <         X"$as_dir" : 'X\(//\)[^/]' \| \
8583 <         X"$as_dir" : 'X\(//\)$' \| \
8584 <         X"$as_dir" : 'X\(/\)' \| \
8585 <         .     : '\(.\)' 2>/dev/null ||
8586 < echo X"$as_dir" |
8587 <    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8588 <          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8589 <          /^X\(\/\/\)$/{ s//\1/; q; }
8590 <          /^X\(\/\).*/{ s//\1/; q; }
8591 <          s/.*/./; q'`
8592 <    done
8593 <    test ! -n "$as_dirs" || mkdir $as_dirs
8594 <  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8595 < echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8596 <   { (exit 1); exit 1; }; }; }
10349 > }
10350 > {
10351 >  line = $ 0
10352 >  nfields = split(line, field, "@")
10353 >  substed = 0
10354 >  len = length(field[1])
10355 >  for (i = 2; i < nfields; i++) {
10356 >    key = field[i]
10357 >    keylen = length(key)
10358 >    if (S_is_set[key]) {
10359 >      value = S[key]
10360 >      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
10361 >      len += length(value) + length(field[++i])
10362 >      substed = 1
10363 >    } else
10364 >      len += 1 + keylen
10365 >  }
10366  
10367 <  ac_builddir=.
10367 >  print line
10368 > }
10369  
10370 < if test "$ac_dir" != .; then
10371 <  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
10372 <  # A "../" for each directory in $ac_dir_suffix.
10373 <  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
10370 > _ACAWK
10371 > _ACEOF
10372 > cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10373 > if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
10374 >  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
10375   else
10376 <  ac_dir_suffix= ac_top_builddir=
10376 >  cat
10377 > fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
10378 >  || as_fn_error "could not setup config files machinery" "$LINENO" 5
10379 > _ACEOF
10380 >
10381 > # VPATH may cause trouble with some makes, so we remove $(srcdir),
10382 > # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
10383 > # trailing colons and then remove the whole line if VPATH becomes empty
10384 > # (actually we leave an empty line to preserve line numbers).
10385 > if test "x$srcdir" = x.; then
10386 >  ac_vpsub='/^[  ]*VPATH[        ]*=/{
10387 > s/:*\$(srcdir):*/:/
10388 > s/:*\${srcdir}:*/:/
10389 > s/:*@srcdir@:*/:/
10390 > s/^\([^=]*=[     ]*\):*/\1/
10391 > s/:*$//
10392 > s/^[^=]*=[       ]*$//
10393 > }'
10394   fi
10395  
10396 < case $srcdir in
10397 <  .)  # No --srcdir option.  We are building in place.
8610 <    ac_srcdir=.
8611 <    if test -z "$ac_top_builddir"; then
8612 <       ac_top_srcdir=.
8613 <    else
8614 <       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
8615 <    fi ;;
8616 <  [\\/]* | ?:[\\/]* )  # Absolute path.
8617 <    ac_srcdir=$srcdir$ac_dir_suffix;
8618 <    ac_top_srcdir=$srcdir ;;
8619 <  *) # Relative path.
8620 <    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
8621 <    ac_top_srcdir=$ac_top_builddir$srcdir ;;
8622 < esac
10396 > cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10397 > fi # test -n "$CONFIG_FILES"
10398  
10399 < # Do not use `cd foo && pwd` to compute absolute paths, because
10400 < # the directories may not exist.
10401 < case `pwd` in
10402 < .) ac_abs_builddir="$ac_dir";;
10403 < *)
10404 <  case "$ac_dir" in
10405 <  .) ac_abs_builddir=`pwd`;;
8631 <  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
8632 <  *) ac_abs_builddir=`pwd`/"$ac_dir";;
8633 <  esac;;
8634 < esac
8635 < case $ac_abs_builddir in
8636 < .) ac_abs_top_builddir=${ac_top_builddir}.;;
8637 < *)
8638 <  case ${ac_top_builddir}. in
8639 <  .) ac_abs_top_builddir=$ac_abs_builddir;;
8640 <  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8641 <  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
8642 <  esac;;
8643 < esac
8644 < case $ac_abs_builddir in
8645 < .) ac_abs_srcdir=$ac_srcdir;;
8646 < *)
8647 <  case $ac_srcdir in
8648 <  .) ac_abs_srcdir=$ac_abs_builddir;;
8649 <  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8650 <  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
8651 <  esac;;
8652 < esac
8653 < case $ac_abs_builddir in
8654 < .) ac_abs_top_srcdir=$ac_top_srcdir;;
8655 < *)
8656 <  case $ac_top_srcdir in
8657 <  .) ac_abs_top_srcdir=$ac_abs_builddir;;
8658 <  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8659 <  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
8660 <  esac;;
8661 < esac
8662 <
8663 <
8664 <  case $INSTALL in
8665 <  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
8666 <  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
8667 <  esac
10399 > # Set up the scripts for CONFIG_HEADERS section.
10400 > # No need to generate them if there are no CONFIG_HEADERS.
10401 > # This happens for instance with `./config.status Makefile'.
10402 > if test -n "$CONFIG_HEADERS"; then
10403 > cat >"$tmp/defines.awk" <<\_ACAWK ||
10404 > BEGIN {
10405 > _ACEOF
10406  
10407 <  if test x"$ac_file" != x-; then
10408 <    { echo "$as_me:$LINENO: creating $ac_file" >&5
10409 < echo "$as_me: creating $ac_file" >&6;}
8672 <    rm -f "$ac_file"
8673 <  fi
8674 <  # Let's still pretend it is `configure' which instantiates (i.e., don't
8675 <  # use $as_me), people would be surprised to read:
8676 <  #    /* config.h.  Generated by config.status.  */
8677 <  if test x"$ac_file" = x-; then
8678 <    configure_input=
8679 <  else
8680 <    configure_input="$ac_file.  "
8681 <  fi
8682 <  configure_input=$configure_input"Generated from `echo $ac_file_in |
8683 <                                     sed 's,.*/,,'` by configure."
10407 > # Transform confdefs.h into an awk script `defines.awk', embedded as
10408 > # here-document in config.status, that substitutes the proper values into
10409 > # config.h.in to produce config.h.
10410  
10411 <  # First look for the input files in the build tree, otherwise in the
10412 <  # src tree.
10413 <  ac_file_inputs=`IFS=:
10414 <    for f in $ac_file_in; do
10415 <      case $f in
10416 <      -) echo $tmp/stdin ;;
10417 <      [\\/$]*)
10418 <         # Absolute (can't be DOS-style, as IFS=:)
10419 <         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8694 < echo "$as_me: error: cannot find input file: $f" >&2;}
8695 <   { (exit 1); exit 1; }; }
8696 <         echo "$f";;
8697 <      *) # Relative
8698 <         if test -f "$f"; then
8699 <           # Build tree
8700 <           echo "$f"
8701 <         elif test -f "$srcdir/$f"; then
8702 <           # Source tree
8703 <           echo "$srcdir/$f"
8704 <         else
8705 <           # /dev/null tree
8706 <           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8707 < echo "$as_me: error: cannot find input file: $f" >&2;}
8708 <   { (exit 1); exit 1; }; }
8709 <         fi;;
8710 <      esac
8711 <    done` || { (exit 1); exit 1; }
8712 < _ACEOF
8713 < cat >>$CONFIG_STATUS <<_ACEOF
8714 <  sed "$ac_vpsub
8715 < $extrasub
8716 < _ACEOF
8717 < cat >>$CONFIG_STATUS <<\_ACEOF
8718 < :t
8719 < /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
8720 < s,@configure_input@,$configure_input,;t t
8721 < s,@srcdir@,$ac_srcdir,;t t
8722 < s,@abs_srcdir@,$ac_abs_srcdir,;t t
8723 < s,@top_srcdir@,$ac_top_srcdir,;t t
8724 < s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
8725 < s,@builddir@,$ac_builddir,;t t
8726 < s,@abs_builddir@,$ac_abs_builddir,;t t
8727 < s,@top_builddir@,$ac_top_builddir,;t t
8728 < s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
8729 < s,@INSTALL@,$ac_INSTALL,;t t
8730 < " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
8731 <  rm -f $tmp/stdin
8732 <  if test x"$ac_file" != x-; then
8733 <    mv $tmp/out $ac_file
10411 > # Create a delimiter string that does not exist in confdefs.h, to ease
10412 > # handling of long lines.
10413 > ac_delim='%!_!# '
10414 > for ac_last_try in false false :; do
10415 >  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
10416 >  if test -z "$ac_t"; then
10417 >    break
10418 >  elif $ac_last_try; then
10419 >    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
10420    else
10421 <    cat $tmp/out
8736 <    rm -f $tmp/out
10421 >    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10422    fi
8738
10423   done
8740 _ACEOF
8741 cat >>$CONFIG_STATUS <<\_ACEOF
10424  
10425 < #
10426 < # CONFIG_HEADER section.
10427 < #
10425 > # For the awk script, D is an array of macro values keyed by name,
10426 > # likewise P contains macro parameters if any.  Preserve backslash
10427 > # newline sequences.
10428  
10429 < # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10430 < # NAME is the cpp macro being defined and VALUE is the value it is being given.
10431 < #
10432 < # ac_d sets the value in "#define NAME VALUE" lines.
10433 < ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
10434 < ac_dB='[         ].*$,\1#\2'
10435 < ac_dC=' '
10436 < ac_dD=',;t'
10437 < # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10438 < ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10439 < ac_uB='$,\1#\2define\3'
10440 < ac_uC=' '
10441 < ac_uD=',;t'
10429 > ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
10430 > sed -n '
10431 > s/.\{148\}/&'"$ac_delim"'/g
10432 > t rset
10433 > :rset
10434 > s/^[     ]*#[    ]*define[       ][      ]*/ /
10435 > t def
10436 > d
10437 > :def
10438 > s/\\$//
10439 > t bsnl
10440 > s/["\\]/\\&/g
10441 > s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
10442 > D["\1"]=" \3"/p
10443 > s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
10444 > d
10445 > :bsnl
10446 > s/["\\]/\\&/g
10447 > s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
10448 > D["\1"]=" \3\\\\\\n"\\/p
10449 > t cont
10450 > s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
10451 > t cont
10452 > d
10453 > :cont
10454 > n
10455 > s/.\{148\}/&'"$ac_delim"'/g
10456 > t clear
10457 > :clear
10458 > s/\\$//
10459 > t bsnlc
10460 > s/["\\]/\\&/g; s/^/"/; s/$/"/p
10461 > d
10462 > :bsnlc
10463 > s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
10464 > b cont
10465 > ' <confdefs.h | sed '
10466 > s/'"$ac_delim"'/"\\\
10467 > "/g' >>$CONFIG_STATUS || ac_write_fail=1
10468  
10469 < for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
10470 <  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10471 <  case $ac_file in
10472 <  - | *:- | *:-:* ) # input from stdin
10473 <        cat >$tmp/stdin
10474 <        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
10475 <        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
10476 <  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
10477 <        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
10478 <  * )   ac_file_in=$ac_file.in ;;
10479 <  esac
10469 > cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10470 >  for (key in D) D_is_set[key] = 1
10471 >  FS = ""
10472 > }
10473 > /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
10474 >  line = \$ 0
10475 >  split(line, arg, " ")
10476 >  if (arg[1] == "#") {
10477 >    defundef = arg[2]
10478 >    mac1 = arg[3]
10479 >  } else {
10480 >    defundef = substr(arg[1], 2)
10481 >    mac1 = arg[2]
10482 >  }
10483 >  split(mac1, mac2, "(") #)
10484 >  macro = mac2[1]
10485 >  prefix = substr(line, 1, index(line, defundef) - 1)
10486 >  if (D_is_set[macro]) {
10487 >    # Preserve the white space surrounding the "#".
10488 >    print prefix "define", macro P[macro] D[macro]
10489 >    next
10490 >  } else {
10491 >    # Replace #undef with comments.  This is necessary, for example,
10492 >    # in the case of _POSIX_SOURCE, which is predefined and required
10493 >    # on some systems where configure will not decide to define it.
10494 >    if (defundef == "undef") {
10495 >      print "/*", prefix defundef, macro, "*/"
10496 >      next
10497 >    }
10498 >  }
10499 > }
10500 > { print }
10501 > _ACAWK
10502 > _ACEOF
10503 > cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10504 >  as_fn_error "could not setup config headers machinery" "$LINENO" 5
10505 > fi # test -n "$CONFIG_HEADERS"
10506  
8773  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
8774 echo "$as_me: creating $ac_file" >&6;}
10507  
10508 <  # First look for the input files in the build tree, otherwise in the
10509 <  # src tree.
10510 <  ac_file_inputs=`IFS=:
10511 <    for f in $ac_file_in; do
10512 <      case $f in
10513 <      -) echo $tmp/stdin ;;
10514 <      [\\/$]*)
10515 <         # Absolute (can't be DOS-style, as IFS=:)
10516 <         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
10517 < echo "$as_me: error: cannot find input file: $f" >&2;}
10518 <   { (exit 1); exit 1; }; }
10519 <         # Do quote $f, to prevent DOS paths from being IFS'd.
10520 <         echo "$f";;
10521 <      *) # Relative
10522 <         if test -f "$f"; then
10523 <           # Build tree
10524 <           echo "$f"
10525 <         elif test -f "$srcdir/$f"; then
10526 <           # Source tree
10527 <           echo "$srcdir/$f"
8796 <         else
8797 <           # /dev/null tree
8798 <           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8799 < echo "$as_me: error: cannot find input file: $f" >&2;}
8800 <   { (exit 1); exit 1; }; }
8801 <         fi;;
8802 <      esac
8803 <    done` || { (exit 1); exit 1; }
8804 <  # Remove the trailing spaces.
8805 <  sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
10508 > eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
10509 > shift
10510 > for ac_tag
10511 > do
10512 >  case $ac_tag in
10513 >  :[FHLC]) ac_mode=$ac_tag; continue;;
10514 >  esac
10515 >  case $ac_mode$ac_tag in
10516 >  :[FHL]*:*);;
10517 >  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
10518 >  :[FH]-) ac_tag=-:-;;
10519 >  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
10520 >  esac
10521 >  ac_save_IFS=$IFS
10522 >  IFS=:
10523 >  set x $ac_tag
10524 >  IFS=$ac_save_IFS
10525 >  shift
10526 >  ac_file=$1
10527 >  shift
10528  
10529 < _ACEOF
10529 >  case $ac_mode in
10530 >  :L) ac_source=$1;;
10531 >  :[FH])
10532 >    ac_file_inputs=
10533 >    for ac_f
10534 >    do
10535 >      case $ac_f in
10536 >      -) ac_f="$tmp/stdin";;
10537 >      *) # Look for the file first in the build tree, then in the source tree
10538 >         # (if the path is not absolute).  The absolute path cannot be DOS-style,
10539 >         # because $ac_f cannot contain `:'.
10540 >         test -f "$ac_f" ||
10541 >           case $ac_f in
10542 >           [\\/$]*) false;;
10543 >           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
10544 >           esac ||
10545 >           as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
10546 >      esac
10547 >      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
10548 >      as_fn_append ac_file_inputs " '$ac_f'"
10549 >    done
10550  
10551 < # Transform confdefs.h into two sed scripts, `conftest.defines' and
10552 < # `conftest.undefs', that substitutes the proper values into
10553 < # config.h.in to produce config.h.  The first handles `#define'
10554 < # templates, and the second `#undef' templates.
10555 < # And first: Protect against being on the right side of a sed subst in
10556 < # config.status.  Protect against being in an unquoted here document
10557 < # in config.status.
10558 < rm -f conftest.defines conftest.undefs
10559 < # Using a here document instead of a string reduces the quoting nightmare.
10560 < # Putting comments in sed scripts is not portable.
10561 < #
10562 < # `end' is used to avoid that the second main sed command (meant for
10563 < # 0-ary CPP macros) applies to n-ary macro definitions.
10564 < # See the Autoconf documentation for `clear'.
10565 < cat >confdef2sed.sed <<\_ACEOF
10566 < s/[\\&,]/\\&/g
10567 < s,[\\$`],\\&,g
10568 < t clear
8827 < : clear
8828 < s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
8829 < t end
8830 < s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
8831 < : end
8832 < _ACEOF
8833 < # If some macros were called several times there might be several times
8834 < # the same #defines, which is useless.  Nevertheless, we may not want to
8835 < # sort them, since we want the *last* AC-DEFINE to be honored.
8836 < uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
8837 < sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
8838 < rm -f confdef2sed.sed
10551 >    # Let's still pretend it is `configure' which instantiates (i.e., don't
10552 >    # use $as_me), people would be surprised to read:
10553 >    #    /* config.h.  Generated by config.status.  */
10554 >    configure_input='Generated from '`
10555 >          $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
10556 >        `' by configure.'
10557 >    if test x"$ac_file" != x-; then
10558 >      configure_input="$ac_file.  $configure_input"
10559 >      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
10560 > $as_echo "$as_me: creating $ac_file" >&6;}
10561 >    fi
10562 >    # Neutralize special characters interpreted by sed in replacement strings.
10563 >    case $configure_input in #(
10564 >    *\&* | *\|* | *\\* )
10565 >       ac_sed_conf_input=`$as_echo "$configure_input" |
10566 >       sed 's/[\\\\&|]/\\\\&/g'`;; #(
10567 >    *) ac_sed_conf_input=$configure_input;;
10568 >    esac
10569  
10570 < # This sed command replaces #undef with comments.  This is necessary, for
10571 < # example, in the case of _POSIX_SOURCE, which is predefined and required
10572 < # on some systems where configure will not decide to define it.
10573 < cat >>conftest.undefs <<\_ACEOF
10574 < s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
10575 < _ACEOF
10570 >    case $ac_tag in
10571 >    *:-:* | *:-) cat >"$tmp/stdin" \
10572 >      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
10573 >    esac
10574 >    ;;
10575 >  esac
10576  
10577 < # Break up conftest.defines because some shells have a limit on the size
8848 < # of here documents, and old seds have small limits too (100 cmds).
8849 < echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
8850 < echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
8851 < echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
8852 < echo '  :' >>$CONFIG_STATUS
8853 < rm -f conftest.tail
8854 < while grep . conftest.defines >/dev/null
8855 < do
8856 <  # Write a limited-size here document to $tmp/defines.sed.
8857 <  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
8858 <  # Speed up: don't consider the non `#define' lines.
8859 <  echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
8860 <  # Work around the forget-to-reset-the-flag bug.
8861 <  echo 't clr' >>$CONFIG_STATUS
8862 <  echo ': clr' >>$CONFIG_STATUS
8863 <  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
8864 <  echo 'CEOF
8865 <  sed -f $tmp/defines.sed $tmp/in >$tmp/out
8866 <  rm -f $tmp/in
8867 <  mv $tmp/out $tmp/in
8868 < ' >>$CONFIG_STATUS
8869 <  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
8870 <  rm -f conftest.defines
8871 <  mv conftest.tail conftest.defines
8872 < done
8873 < rm -f conftest.defines
8874 < echo '  fi # grep' >>$CONFIG_STATUS
8875 < echo >>$CONFIG_STATUS
8876 <
8877 < # Break up conftest.undefs because some shells have a limit on the size
8878 < # of here documents, and old seds have small limits too (100 cmds).
8879 < echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
8880 < rm -f conftest.tail
8881 < while grep . conftest.undefs >/dev/null
8882 < do
8883 <  # Write a limited-size here document to $tmp/undefs.sed.
8884 <  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
8885 <  # Speed up: don't consider the non `#undef'
8886 <  echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
8887 <  # Work around the forget-to-reset-the-flag bug.
8888 <  echo 't clr' >>$CONFIG_STATUS
8889 <  echo ': clr' >>$CONFIG_STATUS
8890 <  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
8891 <  echo 'CEOF
8892 <  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
8893 <  rm -f $tmp/in
8894 <  mv $tmp/out $tmp/in
8895 < ' >>$CONFIG_STATUS
8896 <  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
8897 <  rm -f conftest.undefs
8898 <  mv conftest.tail conftest.undefs
8899 < done
8900 < rm -f conftest.undefs
8901 <
8902 < cat >>$CONFIG_STATUS <<\_ACEOF
8903 <  # Let's still pretend it is `configure' which instantiates (i.e., don't
8904 <  # use $as_me), people would be surprised to read:
8905 <  #    /* config.h.  Generated by config.status.  */
8906 <  if test x"$ac_file" = x-; then
8907 <    echo "/* Generated by configure.  */" >$tmp/config.h
8908 <  else
8909 <    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
8910 <  fi
8911 <  cat $tmp/in >>$tmp/config.h
8912 <  rm -f $tmp/in
8913 <  if test x"$ac_file" != x-; then
8914 <    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
8915 <      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
8916 < echo "$as_me: $ac_file is unchanged" >&6;}
8917 <    else
8918 <      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
10577 >  ac_dir=`$as_dirname -- "$ac_file" ||
10578   $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10579           X"$ac_file" : 'X\(//\)[^/]' \| \
10580           X"$ac_file" : 'X\(//\)$' \| \
10581 <         X"$ac_file" : 'X\(/\)' \| \
10582 <         .     : '\(.\)' 2>/dev/null ||
10583 < echo X"$ac_file" |
10584 <    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10585 <          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10586 <          /^X\(\/\/\)$/{ s//\1/; q; }
10587 <          /^X\(\/\).*/{ s//\1/; q; }
10588 <          s/.*/./; q'`
10589 <      { if $as_mkdir_p; then
10590 <    mkdir -p "$ac_dir"
10591 <  else
10592 <    as_dir="$ac_dir"
10593 <    as_dirs=
10594 <    while test ! -d "$as_dir"; do
10595 <      as_dirs="$as_dir $as_dirs"
10596 <      as_dir=`(dirname "$as_dir") 2>/dev/null ||
10597 < $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10598 <         X"$as_dir" : 'X\(//\)[^/]' \| \
10599 <         X"$as_dir" : 'X\(//\)$' \| \
10600 <         X"$as_dir" : 'X\(/\)' \| \
8942 <         .     : '\(.\)' 2>/dev/null ||
8943 < echo X"$as_dir" |
8944 <    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8945 <          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8946 <          /^X\(\/\/\)$/{ s//\1/; q; }
8947 <          /^X\(\/\).*/{ s//\1/; q; }
8948 <          s/.*/./; q'`
8949 <    done
8950 <    test ! -n "$as_dirs" || mkdir $as_dirs
8951 <  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8952 < echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8953 <   { (exit 1); exit 1; }; }; }
8954 <
8955 <      rm -f $ac_file
8956 <      mv $tmp/config.h $ac_file
8957 <    fi
8958 <  else
8959 <    cat $tmp/config.h
8960 <    rm -f $tmp/config.h
8961 <  fi
8962 < done
8963 < _ACEOF
8964 < cat >>$CONFIG_STATUS <<\_ACEOF
8965 <
8966 < #
8967 < # CONFIG_LINKS section.
8968 < #
8969 <
8970 < for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
8971 <  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
8972 <  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
8973 <
8974 <  { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
8975 < echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
8976 <
8977 <  if test ! -r $srcdir/$ac_source; then
8978 <    { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
8979 < echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
8980 <   { (exit 1); exit 1; }; }
8981 <  fi
8982 <  rm -f $ac_dest
8983 <
8984 <  # Make relative symlinks.
8985 <  ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
8986 < $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8987 <         X"$ac_dest" : 'X\(//\)[^/]' \| \
8988 <         X"$ac_dest" : 'X\(//\)$' \| \
8989 <         X"$ac_dest" : 'X\(/\)' \| \
8990 <         .     : '\(.\)' 2>/dev/null ||
8991 < echo X"$ac_dest" |
8992 <    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8993 <          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8994 <          /^X\(\/\/\)$/{ s//\1/; q; }
8995 <          /^X\(\/\).*/{ s//\1/; q; }
8996 <          s/.*/./; q'`
8997 <  { if $as_mkdir_p; then
8998 <    mkdir -p "$ac_dest_dir"
8999 <  else
9000 <    as_dir="$ac_dest_dir"
9001 <    as_dirs=
9002 <    while test ! -d "$as_dir"; do
9003 <      as_dirs="$as_dir $as_dirs"
9004 <      as_dir=`(dirname "$as_dir") 2>/dev/null ||
9005 < $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9006 <         X"$as_dir" : 'X\(//\)[^/]' \| \
9007 <         X"$as_dir" : 'X\(//\)$' \| \
9008 <         X"$as_dir" : 'X\(/\)' \| \
9009 <         .     : '\(.\)' 2>/dev/null ||
9010 < echo X"$as_dir" |
9011 <    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9012 <          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9013 <          /^X\(\/\/\)$/{ s//\1/; q; }
9014 <          /^X\(\/\).*/{ s//\1/; q; }
9015 <          s/.*/./; q'`
9016 <    done
9017 <    test ! -n "$as_dirs" || mkdir $as_dirs
9018 <  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
9019 < echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
9020 <   { (exit 1); exit 1; }; }; }
9021 <
10581 >         X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
10582 > $as_echo X"$ac_file" |
10583 >    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10584 >            s//\1/
10585 >            q
10586 >          }
10587 >          /^X\(\/\/\)[^/].*/{
10588 >            s//\1/
10589 >            q
10590 >          }
10591 >          /^X\(\/\/\)$/{
10592 >            s//\1/
10593 >            q
10594 >          }
10595 >          /^X\(\/\).*/{
10596 >            s//\1/
10597 >            q
10598 >          }
10599 >          s/.*/./; q'`
10600 >  as_dir="$ac_dir"; as_fn_mkdir_p
10601    ac_builddir=.
10602  
10603 < if test "$ac_dest_dir" != .; then
10604 <  ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
10605 <  # A "../" for each directory in $ac_dir_suffix.
10606 <  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
10607 < else
10608 <  ac_dir_suffix= ac_top_builddir=
10609 < fi
10603 > case "$ac_dir" in
10604 > .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
10605 > *)
10606 >  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
10607 >  # A ".." for each directory in $ac_dir_suffix.
10608 >  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
10609 >  case $ac_top_builddir_sub in
10610 >  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
10611 >  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
10612 >  esac ;;
10613 > esac
10614 > ac_abs_top_builddir=$ac_pwd
10615 > ac_abs_builddir=$ac_pwd$ac_dir_suffix
10616 > # for backward compatibility:
10617 > ac_top_builddir=$ac_top_build_prefix
10618  
10619   case $srcdir in
10620 <  .)  # No --srcdir option.  We are building in place.
10620 >  .)  # We are building in place.
10621      ac_srcdir=.
10622 <    if test -z "$ac_top_builddir"; then
10623 <       ac_top_srcdir=.
10624 <    else
9038 <       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
9039 <    fi ;;
9040 <  [\\/]* | ?:[\\/]* )  # Absolute path.
10622 >    ac_top_srcdir=$ac_top_builddir_sub
10623 >    ac_abs_top_srcdir=$ac_pwd ;;
10624 >  [\\/]* | ?:[\\/]* )  # Absolute name.
10625      ac_srcdir=$srcdir$ac_dir_suffix;
10626 <    ac_top_srcdir=$srcdir ;;
10627 <  *) # Relative path.
10628 <    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
10629 <    ac_top_srcdir=$ac_top_builddir$srcdir ;;
10626 >    ac_top_srcdir=$srcdir
10627 >    ac_abs_top_srcdir=$srcdir ;;
10628 >  *) # Relative name.
10629 >    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
10630 >    ac_top_srcdir=$ac_top_build_prefix$srcdir
10631 >    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
10632   esac
10633 + ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
10634  
9048 # Do not use `cd foo && pwd` to compute absolute paths, because
9049 # the directories may not exist.
9050 case `pwd` in
9051 .) ac_abs_builddir="$ac_dest_dir";;
9052 *)
9053  case "$ac_dest_dir" in
9054  .) ac_abs_builddir=`pwd`;;
9055  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
9056  *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
9057  esac;;
9058 esac
9059 case $ac_abs_builddir in
9060 .) ac_abs_top_builddir=${ac_top_builddir}.;;
9061 *)
9062  case ${ac_top_builddir}. in
9063  .) ac_abs_top_builddir=$ac_abs_builddir;;
9064  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
9065  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
9066  esac;;
9067 esac
9068 case $ac_abs_builddir in
9069 .) ac_abs_srcdir=$ac_srcdir;;
9070 *)
9071  case $ac_srcdir in
9072  .) ac_abs_srcdir=$ac_abs_builddir;;
9073  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
9074  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
9075  esac;;
9076 esac
9077 case $ac_abs_builddir in
9078 .) ac_abs_top_srcdir=$ac_top_srcdir;;
9079 *)
9080  case $ac_top_srcdir in
9081  .) ac_abs_top_srcdir=$ac_abs_builddir;;
9082  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
9083  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
9084  esac;;
9085 esac
10635  
10636 +  case $ac_mode in
10637 +  :F)
10638 +  #
10639 +  # CONFIG_FILE
10640 +  #
10641  
10642 <  case $srcdir in
10643 <  [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
10644 <      *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
10642 >  case $INSTALL in
10643 >  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
10644 >  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
10645    esac
10646 + _ACEOF
10647  
10648 <  # Try a symlink, then a hard link, then a copy.
10649 <  ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10650 <    ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
10651 <    cp -p $srcdir/$ac_source $ac_dest ||
10652 <    { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
10653 < echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
10654 <   { (exit 1); exit 1; }; }
10655 < done
10648 > cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10649 > # If the template does not know about datarootdir, expand it.
10650 > # FIXME: This hack should be removed a few years after 2.60.
10651 > ac_datarootdir_hack=; ac_datarootdir_seen=
10652 > ac_sed_dataroot='
10653 > /datarootdir/ {
10654 >  p
10655 >  q
10656 > }
10657 > /@datadir@/p
10658 > /@docdir@/p
10659 > /@infodir@/p
10660 > /@localedir@/p
10661 > /@mandir@/p'
10662 > case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
10663 > *datarootdir*) ac_datarootdir_seen=yes;;
10664 > *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
10665 >  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
10666 > $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
10667   _ACEOF
10668 + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10669 +  ac_datarootdir_hack='
10670 +  s&@datadir@&$datadir&g
10671 +  s&@docdir@&$docdir&g
10672 +  s&@infodir@&$infodir&g
10673 +  s&@localedir@&$localedir&g
10674 +  s&@mandir@&$mandir&g
10675 +  s&\\\${datarootdir}&$datarootdir&g' ;;
10676 + esac
10677 + _ACEOF
10678  
10679 < cat >>$CONFIG_STATUS <<\_ACEOF
10679 > # Neutralize VPATH when `$srcdir' = `.'.
10680 > # Shell code in configure.ac might set extrasub.
10681 > # FIXME: do we really want to maintain this feature?
10682 > cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10683 > ac_sed_extra="$ac_vpsub
10684 > $extrasub
10685 > _ACEOF
10686 > cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10687 > :t
10688 > /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
10689 > s|@configure_input@|$ac_sed_conf_input|;t t
10690 > s&@top_builddir@&$ac_top_builddir_sub&;t t
10691 > s&@top_build_prefix@&$ac_top_build_prefix&;t t
10692 > s&@srcdir@&$ac_srcdir&;t t
10693 > s&@abs_srcdir@&$ac_abs_srcdir&;t t
10694 > s&@top_srcdir@&$ac_top_srcdir&;t t
10695 > s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
10696 > s&@builddir@&$ac_builddir&;t t
10697 > s&@abs_builddir@&$ac_abs_builddir&;t t
10698 > s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
10699 > s&@INSTALL@&$ac_INSTALL&;t t
10700 > $ac_datarootdir_hack
10701 > "
10702 > eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
10703 >  || as_fn_error "could not create $ac_file" "$LINENO" 5
10704  
10705 < { (exit 0); exit 0; }
10705 > test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
10706 >  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
10707 >  { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
10708 >  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10709 > which seems to be undefined.  Please make sure it is defined." >&5
10710 > $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10711 > which seems to be undefined.  Please make sure it is defined." >&2;}
10712 >
10713 >  rm -f "$tmp/stdin"
10714 >  case $ac_file in
10715 >  -) cat "$tmp/out" && rm -f "$tmp/out";;
10716 >  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
10717 >  esac \
10718 >  || as_fn_error "could not create $ac_file" "$LINENO" 5
10719 > ;;
10720 >  :H)
10721 >  #
10722 >  # CONFIG_HEADER
10723 >  #
10724 >  if test x"$ac_file" != x-; then
10725 >    {
10726 >      $as_echo "/* $configure_input  */" \
10727 >      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
10728 >    } >"$tmp/config.h" \
10729 >      || as_fn_error "could not create $ac_file" "$LINENO" 5
10730 >    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
10731 >      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
10732 > $as_echo "$as_me: $ac_file is unchanged" >&6;}
10733 >    else
10734 >      rm -f "$ac_file"
10735 >      mv "$tmp/config.h" "$ac_file" \
10736 >        || as_fn_error "could not create $ac_file" "$LINENO" 5
10737 >    fi
10738 >  else
10739 >    $as_echo "/* $configure_input  */" \
10740 >      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
10741 >      || as_fn_error "could not create -" "$LINENO" 5
10742 >  fi
10743 > ;;
10744 >
10745 >
10746 >  esac
10747 >
10748 >
10749 >  case $ac_file$ac_mode in
10750 >    "make/Makefile":F) chmod 0755 scripts/* ;;
10751 >    "src/utils/Makefile":F) chmod 0755 scripts/* ;;
10752 >    "src/math/Makefile":F) chmod 0755 scripts/* ;;
10753 >    "src/integrators/Makefile":F) chmod 0755 scripts/* ;;
10754 >    "src/applications/atom2md/Makefile":F) chmod 0755 scripts/* ;;
10755 >    "scripts/filepp":F) chmod 0755 scripts/* ;;
10756 >
10757 >  esac
10758 > done # for ac_tag
10759 >
10760 >
10761 > as_fn_exit 0
10762   _ACEOF
9107 chmod +x $CONFIG_STATUS
10763   ac_clean_files=$ac_clean_files_save
10764  
10765 + test $ac_write_fail = 0 ||
10766 +  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
10767  
10768 +
10769   # configure is writing to config.log, and then calls config.status.
10770   # config.status does its own redirection, appending to config.log.
10771   # Unfortunately, on DOS this fails, as config.log is still kept open
# Line 9126 | Line 10784 | if test "$no_create" != yes; then
10784    exec 5>>config.log
10785    # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10786    # would make configure fail if this is the last instruction.
10787 <  $ac_cs_success || { (exit 1); exit 1; }
10787 >  $ac_cs_success || as_fn_exit $?
10788   fi
10789 + if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
10790 +  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
10791 + $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
10792 + fi
10793  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines