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 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
Revision 1396 by gezelter, Sat Dec 5 02:57:05 2009 UTC

# Line 650 | Line 650 | MPIFC
650   CPP
651   USE_MPI
652   MPIFC
653 + MPICC
654 + MPILIBS
655 + MPICXX
656   ac_ct_FC
657   FCFLAGS
658   FC
656 MPICC
659   ac_ct_CC
660   CFLAGS
661   CC
660 MPILIBS
661 MPICXX
662   OBJEXT
663   EXEEXT
664   ac_ct_CXX
# Line 666 | Line 666 | CXX
666   LDFLAGS
667   CXXFLAGS
668   CXX
669 ac_fc_path
670 ac_fc_set
671 ac_cxx_path
672 ac_cxx_set
673 ac_cc_path
674 ac_cc_set
669   USE_SINGLE_PRECISION
670   debug
671   PROGNAME
# Line 747 | Line 741 | CCC
741   LIBS
742   CPPFLAGS
743   CCC
750 MPICXX
744   CC
745   CFLAGS
753 MPICC
746   FC
747   FCFLAGS
748 + MPICXX
749 + MPICC
750   MPIFC
751   CPP
752   CXXCPP'
# Line 1402 | Line 1396 | Some influential environment variables:
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>
1405  MPICXX      MPI C++ compiler command
1399    CC          C compiler command
1400    CFLAGS      C compiler flags
1408  MPICC       MPI C compiler command
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
# Line 1529 | Line 1523 | fi
1523    as_fn_set_status $ac_retval
1524  
1525   } # ac_fn_cxx_try_compile
1526 +
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 +        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 + } # ac_fn_c_try_compile
1564 +
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 +        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   # ac_fn_cxx_try_link LINENO
1604   # -------------------------
1605   # Try to link conftest.$ac_ext, and return whether this succeeded.
# Line 1642 | Line 1712 | $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
1645
1646 # ac_fn_c_try_compile LINENO
1647 # --------------------------
1648 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1649 ac_fn_c_try_compile ()
1650 {
1651  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652  rm -f conftest.$ac_objext
1653  if { { ac_try="$ac_compile"
1654 case "(($ac_try" in
1655  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1656  *) ac_try_echo=$ac_try;;
1657 esac
1658 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1659 $as_echo "$ac_try_echo"; } >&5
1660  (eval "$ac_compile") 2>conftest.err
1661  ac_status=$?
1662  if test -s conftest.err; then
1663    grep -v '^ *+' conftest.err >conftest.er1
1664    cat conftest.er1 >&5
1665    mv -f conftest.er1 conftest.err
1666  fi
1667  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1668  test $ac_status = 0; } && {
1669         test -z "$ac_c_werror_flag" ||
1670         test ! -s conftest.err
1671       } && test -s conftest.$ac_objext; then :
1672  ac_retval=0
1673 else
1674  $as_echo "$as_me: failed program was:" >&5
1675 sed 's/^/| /' conftest.$ac_ext >&5
1676
1677        ac_retval=1
1678 fi
1679  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1680  as_fn_set_status $ac_retval
1715  
1682 } # ac_fn_c_try_compile
1683
1716   # ac_fn_c_try_link LINENO
1717   # -----------------------
1718   # Try to link conftest.$ac_ext, and return whether this succeeded.
# Line 1794 | Line 1826 | $as_echo "$ac_res" >&6; }
1826  
1827   } # ac_fn_c_check_func
1828  
1797 # ac_fn_fc_try_compile LINENO
1798 # ---------------------------
1799 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1800 ac_fn_fc_try_compile ()
1801 {
1802  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1803  rm -f conftest.$ac_objext
1804  if { { ac_try="$ac_compile"
1805 case "(($ac_try" in
1806  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1807  *) ac_try_echo=$ac_try;;
1808 esac
1809 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1810 $as_echo "$ac_try_echo"; } >&5
1811  (eval "$ac_compile") 2>conftest.err
1812  ac_status=$?
1813  if test -s conftest.err; then
1814    grep -v '^ *+' conftest.err >conftest.er1
1815    cat conftest.er1 >&5
1816    mv -f conftest.er1 conftest.err
1817  fi
1818  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1819  test $ac_status = 0; } && {
1820         test -z "$ac_fc_werror_flag" ||
1821         test ! -s conftest.err
1822       } && test -s conftest.$ac_objext; then :
1823  ac_retval=0
1824 else
1825  $as_echo "$as_me: failed program was:" >&5
1826 sed 's/^/| /' conftest.$ac_ext >&5
1827
1828        ac_retval=1
1829 fi
1830  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1831  as_fn_set_status $ac_retval
1832
1833 } # ac_fn_fc_try_compile
1834
1829   # ac_fn_fc_try_link LINENO
1830   # ------------------------
1831   # Try to link conftest.$ac_ext, and return whether this succeeded.
# Line 2973 | Line 2967 | PROGNAME="openmd"
2967  
2968   # set program name
2969   PROGNAME="openmd"
2976
2977
2978
2979
2980 OBJEXT=".$OBJEXT"
2981
2982 OPENMD=openmd
2983
2984 if test "x${prefix}" = "xNONE"
2985 then
2986  OPENMD_HOME=${ac_default_prefix}/openmd
2987 else
2988  OPENMD_HOME=${prefix}/openmd
2989 fi
2990 # Check whether --enable-openmd-home was given.
2991 if test "${enable_openmd_home+set}" = set; then :
2992  enableval=$enable_openmd_home; OPENMD_HOME="${enableval}"
2993 fi
2994
2995
2996 # there are two ways to do debugging.  One with the --enable-debug flag
2997 # and one using the DEBUG environment variable
2998
2999 debug=0
3000 # Check whether --enable-debug was given.
3001 if test "${enable_debug+set}" = set; then :
3002  enableval=$enable_debug; debug=1
3003 fi
3004
3005 if test "${DEBUG}"; then
3006
3007 $as_echo "#define debug 1" >>confdefs.h
3008
3009  msg="$msg, debug mode"
3010 fi
3011
3012
3013 # Check whether --enable-single was given.
3014 if test "${enable_single+set}" = set; then :
3015  enableval=$enable_single; ok=$enableval
3016 else
3017  ok=no
3018 fi
3019
3020 # Check whether --enable-float was given.
3021 if test "${enable_float+set}" = set; then :
3022  enableval=$enable_float; ok=$enableval
3023 fi
3024
3025 if test "$ok" = "yes"; then
3026
3027 $as_echo "#define SINGLE_PRECISION 1" >>confdefs.h
3028
3029        USE_SINGLE_PRECISION=yes
3030
3031 fi
3032
3033 if test x"$CC" != x; then
3034   for ac_prog in $CC
3035 do
3036  # Extract the first word of "$ac_prog", so it can be a program name with args.
3037 set dummy $ac_prog; ac_word=$2
3038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3039 $as_echo_n "checking for $ac_word... " >&6; }
3040 if test "${ac_cv_prog_ac_cc_set+set}" = set; then :
3041  $as_echo_n "(cached) " >&6
3042 else
3043  if test -n "$ac_cc_set"; then
3044  ac_cv_prog_ac_cc_set="$ac_cc_set" # Let the user override the test.
3045 else
3046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3047 for as_dir in $PATH
3048 do
3049  IFS=$as_save_IFS
3050  test -z "$as_dir" && as_dir=.
3051    for ac_exec_ext in '' $ac_executable_extensions; do
3052  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3053    ac_cv_prog_ac_cc_set="$ac_prog"
3054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3055    break 2
3056  fi
3057 done
3058  done
3059 IFS=$as_save_IFS
3060
3061 fi
3062 fi
3063 ac_cc_set=$ac_cv_prog_ac_cc_set
3064 if test -n "$ac_cc_set"; then
3065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cc_set" >&5
3066 $as_echo "$ac_cc_set" >&6; }
3067 else
3068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3069 $as_echo "no" >&6; }
3070 fi
2970  
3072
3073  test -n "$ac_cc_set" && break
3074 done
3075 test -n "$ac_cc_set" || ac_cc_set="no"
3076
3077   if test $ac_cc_set != no; then :
3078
3079     # Extract the first word of "$ac_cc_set", so it can be a program name with args.
3080 set dummy $ac_cc_set; ac_word=$2
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3082 $as_echo_n "checking for $ac_word... " >&6; }
3083 if test "${ac_cv_path_ac_cc_path+set}" = set; then :
3084  $as_echo_n "(cached) " >&6
3085 else
3086  case $ac_cc_path in
3087  [\\/]* | ?:[\\/]*)
3088  ac_cv_path_ac_cc_path="$ac_cc_path" # Let the user override the test with a path.
3089  ;;
3090  *)
3091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3092 for as_dir in $PATH
3093 do
3094  IFS=$as_save_IFS
3095  test -z "$as_dir" && as_dir=.
3096    for ac_exec_ext in '' $ac_executable_extensions; do
3097  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3098    ac_cv_path_ac_cc_path="$as_dir/$ac_word$ac_exec_ext"
3099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3100    break 2
3101  fi
3102 done
3103  done
3104 IFS=$as_save_IFS
3105
3106  test -z "$ac_cv_path_ac_cc_path" && ac_cv_path_ac_cc_path="no"
3107  ;;
3108 esac
3109 fi
3110 ac_cc_path=$ac_cv_path_ac_cc_path
3111 if test -n "$ac_cc_path"; then
3112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cc_path" >&5
3113 $as_echo "$ac_cc_path" >&6; }
3114 else
3115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3116 $as_echo "no" >&6; }
3117 fi
3118
3119
3120 else
3121
3122     as_fn_error "Specified C compiler $CC doesn't seem to exist!" "$LINENO" 5
3123 fi
3124
3125   if test $ac_cc_path != no; then :
3126
3127     { $as_echo "$as_me:${as_lineno-$LINENO}: Will attempt to use $CC as C compiler" >&5
3128 $as_echo "$as_me: Will attempt to use $CC as C compiler" >&6;}
3129     MPICC=$CC
3130
3131 else
3132
3133     as_fn_error "Can't find path to user-specified C compiler $CC" "$LINENO" 5
3134 fi
3135 fi
3136
3137 if test x"$CXX" != x; then
3138   for ac_prog in $CXX
3139 do
3140  # Extract the first word of "$ac_prog", so it can be a program name with args.
3141 set dummy $ac_prog; ac_word=$2
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3143 $as_echo_n "checking for $ac_word... " >&6; }
3144 if test "${ac_cv_prog_ac_cxx_set+set}" = set; then :
3145  $as_echo_n "(cached) " >&6
3146 else
3147  if test -n "$ac_cxx_set"; then
3148  ac_cv_prog_ac_cxx_set="$ac_cxx_set" # Let the user override the test.
3149 else
3150 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3151 for as_dir in $PATH
3152 do
3153  IFS=$as_save_IFS
3154  test -z "$as_dir" && as_dir=.
3155    for ac_exec_ext in '' $ac_executable_extensions; do
3156  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3157    ac_cv_prog_ac_cxx_set="$ac_prog"
3158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3159    break 2
3160  fi
3161 done
3162  done
3163 IFS=$as_save_IFS
3164
3165 fi
3166 fi
3167 ac_cxx_set=$ac_cv_prog_ac_cxx_set
3168 if test -n "$ac_cxx_set"; then
3169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cxx_set" >&5
3170 $as_echo "$ac_cxx_set" >&6; }
3171 else
3172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3173 $as_echo "no" >&6; }
3174 fi
3175
3176
3177  test -n "$ac_cxx_set" && break
3178 done
3179 test -n "$ac_cxx_set" || ac_cxx_set="no"
3180
3181   if test $ac_cxx_set != no; then :
3182
3183     # Extract the first word of "$ac_cxx_set", so it can be a program name with args.
3184 set dummy $ac_cxx_set; ac_word=$2
3185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3186 $as_echo_n "checking for $ac_word... " >&6; }
3187 if test "${ac_cv_path_ac_cxx_path+set}" = set; then :
3188  $as_echo_n "(cached) " >&6
3189 else
3190  case $ac_cxx_path in
3191  [\\/]* | ?:[\\/]*)
3192  ac_cv_path_ac_cxx_path="$ac_cxx_path" # Let the user override the test with a path.
3193  ;;
3194  *)
3195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3196 for as_dir in $PATH
3197 do
3198  IFS=$as_save_IFS
3199  test -z "$as_dir" && as_dir=.
3200    for ac_exec_ext in '' $ac_executable_extensions; do
3201  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3202    ac_cv_path_ac_cxx_path="$as_dir/$ac_word$ac_exec_ext"
3203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3204    break 2
3205  fi
3206 done
3207  done
3208 IFS=$as_save_IFS
3209
3210  test -z "$ac_cv_path_ac_cxx_path" && ac_cv_path_ac_cxx_path="no"
3211  ;;
3212 esac
3213 fi
3214 ac_cxx_path=$ac_cv_path_ac_cxx_path
3215 if test -n "$ac_cxx_path"; then
3216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cxx_path" >&5
3217 $as_echo "$ac_cxx_path" >&6; }
3218 else
3219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3220 $as_echo "no" >&6; }
3221 fi
3222
3223
3224 else
3225
3226     as_fn_error "Specified C++ compiler $CXX doesn't seem to exist!" "$LINENO" 5
3227 fi
3228
3229   if test $ac_cxx_path != no; then :
3230
3231     { $as_echo "$as_me:${as_lineno-$LINENO}: Will attempt to use $CXX as C++ compiler" >&5
3232 $as_echo "$as_me: Will attempt to use $CXX as C++ compiler" >&6;}
3233     MPICXX=$CXX
3234
3235 else
3236
3237     as_fn_error "Can't find path to user-specified C++ compiler $CXX" "$LINENO" 5
3238 fi
3239 fi
3240
3241 if test x"$FC" != x; then
3242   for ac_prog in $FC
3243 do
3244  # Extract the first word of "$ac_prog", so it can be a program name with args.
3245 set dummy $ac_prog; ac_word=$2
3246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3247 $as_echo_n "checking for $ac_word... " >&6; }
3248 if test "${ac_cv_prog_ac_fc_set+set}" = set; then :
3249  $as_echo_n "(cached) " >&6
3250 else
3251  if test -n "$ac_fc_set"; then
3252  ac_cv_prog_ac_fc_set="$ac_fc_set" # Let the user override the test.
3253 else
3254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3255 for as_dir in $PATH
3256 do
3257  IFS=$as_save_IFS
3258  test -z "$as_dir" && as_dir=.
3259    for ac_exec_ext in '' $ac_executable_extensions; do
3260  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3261    ac_cv_prog_ac_fc_set="$ac_prog"
3262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3263    break 2
3264  fi
3265 done
3266  done
3267 IFS=$as_save_IFS
3268
3269 fi
3270 fi
3271 ac_fc_set=$ac_cv_prog_ac_fc_set
3272 if test -n "$ac_fc_set"; then
3273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_fc_set" >&5
3274 $as_echo "$ac_fc_set" >&6; }
3275 else
3276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3277 $as_echo "no" >&6; }
3278 fi
3279
3280
3281  test -n "$ac_fc_set" && break
3282 done
3283 test -n "$ac_fc_set" || ac_fc_set="no"
3284
3285   if test $ac_fc_set != no; then :
3286
3287     # Extract the first word of "$ac_fc_set", so it can be a program name with args.
3288 set dummy $ac_fc_set; ac_word=$2
3289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3290 $as_echo_n "checking for $ac_word... " >&6; }
3291 if test "${ac_cv_path_ac_fc_path+set}" = set; then :
3292  $as_echo_n "(cached) " >&6
3293 else
3294  case $ac_fc_path in
3295  [\\/]* | ?:[\\/]*)
3296  ac_cv_path_ac_fc_path="$ac_fc_path" # Let the user override the test with a path.
3297  ;;
3298  *)
3299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300 for as_dir in $PATH
3301 do
3302  IFS=$as_save_IFS
3303  test -z "$as_dir" && as_dir=.
3304    for ac_exec_ext in '' $ac_executable_extensions; do
3305  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3306    ac_cv_path_ac_fc_path="$as_dir/$ac_word$ac_exec_ext"
3307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3308    break 2
3309  fi
3310 done
3311  done
3312 IFS=$as_save_IFS
3313
3314  test -z "$ac_cv_path_ac_fc_path" && ac_cv_path_ac_fc_path="no"
3315  ;;
3316 esac
3317 fi
3318 ac_fc_path=$ac_cv_path_ac_fc_path
3319 if test -n "$ac_fc_path"; then
3320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_fc_path" >&5
3321 $as_echo "$ac_fc_path" >&6; }
3322 else
3323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3324 $as_echo "no" >&6; }
3325 fi
3326
3327
3328 else
3329
3330     as_fn_error "Specified Fortran compiler $FC doesn't seem to exist!" "$LINENO" 5
3331 fi
3332
3333   if test $ac_fc_path != no; then :
3334
3335     { $as_echo "$as_me:${as_lineno-$LINENO}: Will attempt to use $FC as Fortran compiler" >&5
3336 $as_echo "$as_me: Will attempt to use $FC as Fortran compiler" >&6;}
3337     MPIFC=$FC
3338
3339 else
3340
3341     as_fn_error "Can't find path to user-specified Fortran compiler $FC" "$LINENO" 5
3342 fi
3343 fi
3344
3345
3346 ac_ext=cpp
3347 ac_cpp='$CXXCPP $CPPFLAGS'
3348 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3349 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3350 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3351
3352 ac_ext=cpp
3353 ac_cpp='$CXXCPP $CPPFLAGS'
3354 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3355 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3356 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3357 if test -z "$CXX"; then
3358  if test -n "$CCC"; then
3359    CXX=$CCC
3360  else
3361    if test -n "$ac_tool_prefix"; then
3362  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3363  do
3364    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3365 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3367 $as_echo_n "checking for $ac_word... " >&6; }
3368 if test "${ac_cv_prog_CXX+set}" = set; then :
3369  $as_echo_n "(cached) " >&6
3370 else
3371  if test -n "$CXX"; then
3372  ac_cv_prog_CXX="$CXX" # Let the user override the test.
3373 else
3374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3375 for as_dir in $PATH
3376 do
3377  IFS=$as_save_IFS
3378  test -z "$as_dir" && as_dir=.
3379    for ac_exec_ext in '' $ac_executable_extensions; do
3380  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3381    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3383    break 2
3384  fi
3385 done
3386  done
3387 IFS=$as_save_IFS
3388
3389 fi
3390 fi
3391 CXX=$ac_cv_prog_CXX
3392 if test -n "$CXX"; then
3393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3394 $as_echo "$CXX" >&6; }
3395 else
3396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3397 $as_echo "no" >&6; }
3398 fi
3399
3400
3401    test -n "$CXX" && break
3402  done
3403 fi
3404 if test -z "$CXX"; then
3405  ac_ct_CXX=$CXX
3406  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3407 do
3408  # Extract the first word of "$ac_prog", so it can be a program name with args.
3409 set dummy $ac_prog; ac_word=$2
3410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3411 $as_echo_n "checking for $ac_word... " >&6; }
3412 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
3413  $as_echo_n "(cached) " >&6
3414 else
3415  if test -n "$ac_ct_CXX"; then
3416  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3417 else
3418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3419 for as_dir in $PATH
3420 do
3421  IFS=$as_save_IFS
3422  test -z "$as_dir" && as_dir=.
3423    for ac_exec_ext in '' $ac_executable_extensions; do
3424  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3425    ac_cv_prog_ac_ct_CXX="$ac_prog"
3426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3427    break 2
3428  fi
3429 done
3430  done
3431 IFS=$as_save_IFS
3432
3433 fi
3434 fi
3435 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3436 if test -n "$ac_ct_CXX"; then
3437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3438 $as_echo "$ac_ct_CXX" >&6; }
3439 else
3440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3441 $as_echo "no" >&6; }
3442 fi
3443
3444
3445  test -n "$ac_ct_CXX" && break
3446 done
3447
3448  if test "x$ac_ct_CXX" = x; then
3449    CXX="g++"
3450  else
3451    case $cross_compiling:$ac_tool_warned in
3452 yes:)
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3454 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3455 ac_tool_warned=yes ;;
3456 esac
3457    CXX=$ac_ct_CXX
3458  fi
3459 fi
3460
3461  fi
3462 fi
3463 # Provide some information about the compiler.
3464 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3465 set X $ac_compile
3466 ac_compiler=$2
3467 for ac_option in --version -v -V -qversion; do
3468  { { ac_try="$ac_compiler $ac_option >&5"
3469 case "(($ac_try" in
3470  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3471  *) ac_try_echo=$ac_try;;
3472 esac
3473 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3474 $as_echo "$ac_try_echo"; } >&5
3475  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3476  ac_status=$?
3477  if test -s conftest.err; then
3478    sed '10a\
3479 ... rest of stderr output deleted ...
3480         10q' conftest.err >conftest.er1
3481    cat conftest.er1 >&5
3482  fi
3483  rm -f conftest.er1 conftest.err
3484  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3485  test $ac_status = 0; }
3486 done
3487
3488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3489 /* end confdefs.h.  */
3490
3491 int
3492 main ()
3493 {
3494
3495  ;
3496  return 0;
3497 }
3498 _ACEOF
3499 ac_clean_files_save=$ac_clean_files
3500 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3501 # Try to create an executable without -o first, disregard a.out.
3502 # It will help us diagnose broken compilers, and finding out an intuition
3503 # of exeext.
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
3505 $as_echo_n "checking whether the C++ compiler works... " >&6; }
3506 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3507
3508 # The possible output files:
3509 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3510
3511 ac_rmfiles=
3512 for ac_file in $ac_files
3513 do
3514  case $ac_file in
3515    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3516    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3517  esac
3518 done
3519 rm -f $ac_rmfiles
3520
3521 if { { ac_try="$ac_link_default"
3522 case "(($ac_try" in
3523  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3524  *) ac_try_echo=$ac_try;;
3525 esac
3526 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3527 $as_echo "$ac_try_echo"; } >&5
3528  (eval "$ac_link_default") 2>&5
3529  ac_status=$?
3530  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3531  test $ac_status = 0; }; then :
3532  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3533 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3534 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
3535 # so that the user can short-circuit this test for compilers unknown to
3536 # Autoconf.
3537 for ac_file in $ac_files ''
3538 do
3539  test -f "$ac_file" || continue
3540  case $ac_file in
3541    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3542        ;;
3543    [ab].out )
3544        # We found the default executable, but exeext='' is most
3545        # certainly right.
3546        break;;
3547    *.* )
3548        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3549        then :; else
3550           ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3551        fi
3552        # We set ac_cv_exeext here because the later test for it is not
3553        # safe: cross compilers may not add the suffix if given an `-o'
3554        # argument, so we may need to know it at that point already.
3555        # Even if this section looks crufty: it has the advantage of
3556        # actually working.
3557        break;;
3558    * )
3559        break;;
3560  esac
3561 done
3562 test "$ac_cv_exeext" = no && ac_cv_exeext=
3563
3564 else
3565  ac_file=''
3566 fi
3567 if test -z "$ac_file"; then :
3568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3569 $as_echo "no" >&6; }
3570 $as_echo "$as_me: failed program was:" >&5
3571 sed 's/^/| /' conftest.$ac_ext >&5
3572
3573 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3574 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3575 { as_fn_set_status 77
3576 as_fn_error "C++ compiler cannot create executables
3577 See \`config.log' for more details." "$LINENO" 5; }; }
3578 else
3579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3580 $as_echo "yes" >&6; }
3581 fi
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5
3583 $as_echo_n "checking for C++ compiler default output file name... " >&6; }
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3585 $as_echo "$ac_file" >&6; }
3586 ac_exeext=$ac_cv_exeext
3587
3588 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3589 ac_clean_files=$ac_clean_files_save
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3591 $as_echo_n "checking for suffix of executables... " >&6; }
3592 if { { ac_try="$ac_link"
3593 case "(($ac_try" in
3594  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3595  *) ac_try_echo=$ac_try;;
3596 esac
3597 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3598 $as_echo "$ac_try_echo"; } >&5
3599  (eval "$ac_link") 2>&5
3600  ac_status=$?
3601  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3602  test $ac_status = 0; }; then :
3603  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3604 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3605 # work properly (i.e., refer to `conftest.exe'), while it won't with
3606 # `rm'.
3607 for ac_file in conftest.exe conftest conftest.*; do
3608  test -f "$ac_file" || continue
3609  case $ac_file in
3610    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3611    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3612          break;;
3613    * ) break;;
3614  esac
3615 done
3616 else
3617  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3618 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3619 as_fn_error "cannot compute suffix of executables: cannot compile and link
3620 See \`config.log' for more details." "$LINENO" 5; }
3621 fi
3622 rm -f conftest conftest$ac_cv_exeext
3623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3624 $as_echo "$ac_cv_exeext" >&6; }
3625
3626 rm -f conftest.$ac_ext
3627 EXEEXT=$ac_cv_exeext
3628 ac_exeext=$EXEEXT
3629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3630 /* end confdefs.h.  */
3631 #include <stdio.h>
3632 int
3633 main ()
3634 {
3635 FILE *f = fopen ("conftest.out", "w");
3636 return ferror (f) || fclose (f) != 0;
3637
3638  ;
3639  return 0;
3640 }
3641 _ACEOF
3642 ac_clean_files="$ac_clean_files conftest.out"
3643 # Check that the compiler produces executables we can run.  If not, either
3644 # the compiler is broken, or we cross compile.
3645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3646 $as_echo_n "checking whether we are cross compiling... " >&6; }
3647 if test "$cross_compiling" != yes; then
3648  { { ac_try="$ac_link"
3649 case "(($ac_try" in
3650  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3651  *) ac_try_echo=$ac_try;;
3652 esac
3653 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3654 $as_echo "$ac_try_echo"; } >&5
3655  (eval "$ac_link") 2>&5
3656  ac_status=$?
3657  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3658  test $ac_status = 0; }
3659  if { ac_try='./conftest$ac_cv_exeext'
3660  { { case "(($ac_try" in
3661  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3662  *) ac_try_echo=$ac_try;;
3663 esac
3664 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3665 $as_echo "$ac_try_echo"; } >&5
3666  (eval "$ac_try") 2>&5
3667  ac_status=$?
3668  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3669  test $ac_status = 0; }; }; then
3670    cross_compiling=no
3671  else
3672    if test "$cross_compiling" = maybe; then
3673        cross_compiling=yes
3674    else
3675        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3676 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3677 as_fn_error "cannot run C++ compiled programs.
3678 If you meant to cross compile, use \`--host'.
3679 See \`config.log' for more details." "$LINENO" 5; }
3680    fi
3681  fi
3682 fi
3683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3684 $as_echo "$cross_compiling" >&6; }
3685
3686 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3687 ac_clean_files=$ac_clean_files_save
3688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3689 $as_echo_n "checking for suffix of object files... " >&6; }
3690 if test "${ac_cv_objext+set}" = set; then :
3691  $as_echo_n "(cached) " >&6
3692 else
3693  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3694 /* end confdefs.h.  */
3695
3696 int
3697 main ()
3698 {
3699
3700  ;
3701  return 0;
3702 }
3703 _ACEOF
3704 rm -f conftest.o conftest.obj
3705 if { { ac_try="$ac_compile"
3706 case "(($ac_try" in
3707  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3708  *) ac_try_echo=$ac_try;;
3709 esac
3710 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3711 $as_echo "$ac_try_echo"; } >&5
3712  (eval "$ac_compile") 2>&5
3713  ac_status=$?
3714  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3715  test $ac_status = 0; }; then :
3716  for ac_file in conftest.o conftest.obj conftest.*; do
3717  test -f "$ac_file" || continue;
3718  case $ac_file in
3719    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3720    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3721       break;;
3722  esac
3723 done
3724 else
3725  $as_echo "$as_me: failed program was:" >&5
3726 sed 's/^/| /' conftest.$ac_ext >&5
3727
3728 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3729 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3730 as_fn_error "cannot compute suffix of object files: cannot compile
3731 See \`config.log' for more details." "$LINENO" 5; }
3732 fi
3733 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3734 fi
3735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3736 $as_echo "$ac_cv_objext" >&6; }
3737 OBJEXT=$ac_cv_objext
3738 ac_objext=$OBJEXT
3739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3740 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3741 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3742  $as_echo_n "(cached) " >&6
3743 else
3744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3745 /* end confdefs.h.  */
3746
3747 int
3748 main ()
3749 {
3750 #ifndef __GNUC__
3751       choke me
3752 #endif
3753
3754  ;
3755  return 0;
3756 }
3757 _ACEOF
3758 if ac_fn_cxx_try_compile "$LINENO"; then :
3759  ac_compiler_gnu=yes
3760 else
3761  ac_compiler_gnu=no
3762 fi
3763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3764 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3765
3766 fi
3767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3768 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3769 if test $ac_compiler_gnu = yes; then
3770  GXX=yes
3771 else
3772  GXX=
3773 fi
3774 ac_test_CXXFLAGS=${CXXFLAGS+set}
3775 ac_save_CXXFLAGS=$CXXFLAGS
3776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3777 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3778 if test "${ac_cv_prog_cxx_g+set}" = set; then :
3779  $as_echo_n "(cached) " >&6
3780 else
3781  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3782   ac_cxx_werror_flag=yes
3783   ac_cv_prog_cxx_g=no
3784   CXXFLAGS="-g"
3785   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3786 /* end confdefs.h.  */
3787
3788 int
3789 main ()
3790 {
3791
3792  ;
3793  return 0;
3794 }
3795 _ACEOF
3796 if ac_fn_cxx_try_compile "$LINENO"; then :
3797  ac_cv_prog_cxx_g=yes
3798 else
3799  CXXFLAGS=""
3800      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3801 /* end confdefs.h.  */
3802
3803 int
3804 main ()
3805 {
3806
3807  ;
3808  return 0;
3809 }
3810 _ACEOF
3811 if ac_fn_cxx_try_compile "$LINENO"; then :
3812
3813 else
3814  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3815         CXXFLAGS="-g"
3816         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3817 /* end confdefs.h.  */
3818
3819 int
3820 main ()
3821 {
3822
3823  ;
3824  return 0;
3825 }
3826 _ACEOF
3827 if ac_fn_cxx_try_compile "$LINENO"; then :
3828  ac_cv_prog_cxx_g=yes
3829 fi
3830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3831 fi
3832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3833 fi
3834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3835   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3836 fi
3837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3838 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3839 if test "$ac_test_CXXFLAGS" = set; then
3840  CXXFLAGS=$ac_save_CXXFLAGS
3841 elif test $ac_cv_prog_cxx_g = yes; then
3842  if test "$GXX" = yes; then
3843    CXXFLAGS="-g -O2"
3844  else
3845    CXXFLAGS="-g"
3846  fi
3847 else
3848  if test "$GXX" = yes; then
3849    CXXFLAGS="-O2"
3850  else
3851    CXXFLAGS=
3852  fi
3853 fi
3854 ac_ext=cpp
3855 ac_cpp='$CXXCPP $CPPFLAGS'
3856 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3857 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3858 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3859
3860
3861
3862
3863
3864
3865
3866        for ac_prog in openmpicxx openmpiCC openmpic++ mpic++ mpicxx mpiCC hcp mpxlC_r mpxlC mpCC cmpic++
3867 do
3868  # Extract the first word of "$ac_prog", so it can be a program name with args.
3869 set dummy $ac_prog; ac_word=$2
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871 $as_echo_n "checking for $ac_word... " >&6; }
3872 if test "${ac_cv_prog_MPICXX+set}" = set; then :
3873  $as_echo_n "(cached) " >&6
3874 else
3875  if test -n "$MPICXX"; then
3876  ac_cv_prog_MPICXX="$MPICXX" # Let the user override the test.
3877 else
3878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3879 for as_dir in $PATH
3880 do
3881  IFS=$as_save_IFS
3882  test -z "$as_dir" && as_dir=.
3883    for ac_exec_ext in '' $ac_executable_extensions; do
3884  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3885    ac_cv_prog_MPICXX="$ac_prog"
3886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3887    break 2
3888  fi
3889 done
3890  done
3891 IFS=$as_save_IFS
3892
3893 fi
3894 fi
3895 MPICXX=$ac_cv_prog_MPICXX
3896 if test -n "$MPICXX"; then
3897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICXX" >&5
3898 $as_echo "$MPICXX" >&6; }
3899 else
3900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3901 $as_echo "no" >&6; }
3902 fi
3903
3904
3905  test -n "$MPICXX" && break
3906 done
3907 test -n "$MPICXX" || MPICXX="$CXX"
3908
3909        ax_mpi_save_CXX="$CXX"
3910        CXX="$MPICXX"
3911
3912
3913
3914 if test x = x"$MPILIBS"; then
3915        ac_fn_cxx_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init"
3916 if test "x$ac_cv_func_MPI_Init" = x""yes; then :
3917  MPILIBS=" "
3918 fi
3919
3920 fi
3921
3922 if test x = x"$MPILIBS"; then
3923        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5
3924 $as_echo_n "checking for MPI_Init in -lmpi... " >&6; }
3925 if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then :
3926  $as_echo_n "(cached) " >&6
3927 else
3928  ac_check_lib_save_LIBS=$LIBS
3929 LIBS="-lmpi  $LIBS"
3930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3931 /* end confdefs.h.  */
3932
3933 /* Override any GCC internal prototype to avoid an error.
3934   Use char because int might match the return type of a GCC
3935   builtin and then its argument prototype would still apply.  */
3936 #ifdef __cplusplus
3937 extern "C"
3938 #endif
3939 char MPI_Init ();
3940 int
3941 main ()
3942 {
3943 return MPI_Init ();
3944  ;
3945  return 0;
3946 }
3947 _ACEOF
3948 if ac_fn_cxx_try_link "$LINENO"; then :
3949  ac_cv_lib_mpi_MPI_Init=yes
3950 else
3951  ac_cv_lib_mpi_MPI_Init=no
3952 fi
3953 rm -f core conftest.err conftest.$ac_objext \
3954    conftest$ac_exeext conftest.$ac_ext
3955 LIBS=$ac_check_lib_save_LIBS
3956 fi
3957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5
3958 $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; }
3959 if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then :
3960  MPILIBS="-lmpi"
3961 fi
3962
3963 fi
3964 if test x = x"$MPILIBS"; then
3965        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5
3966 $as_echo_n "checking for MPI_Init in -lmpich... " >&6; }
3967 if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then :
3968  $as_echo_n "(cached) " >&6
3969 else
3970  ac_check_lib_save_LIBS=$LIBS
3971 LIBS="-lmpich  $LIBS"
3972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3973 /* end confdefs.h.  */
3974
3975 /* Override any GCC internal prototype to avoid an error.
3976   Use char because int might match the return type of a GCC
3977   builtin and then its argument prototype would still apply.  */
3978 #ifdef __cplusplus
3979 extern "C"
3980 #endif
3981 char MPI_Init ();
3982 int
3983 main ()
3984 {
3985 return MPI_Init ();
3986  ;
3987  return 0;
3988 }
3989 _ACEOF
3990 if ac_fn_cxx_try_link "$LINENO"; then :
3991  ac_cv_lib_mpich_MPI_Init=yes
3992 else
3993  ac_cv_lib_mpich_MPI_Init=no
3994 fi
3995 rm -f core conftest.err conftest.$ac_objext \
3996    conftest$ac_exeext conftest.$ac_ext
3997 LIBS=$ac_check_lib_save_LIBS
3998 fi
3999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5
4000 $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; }
4001 if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then :
4002  MPILIBS="-lmpich"
4003 fi
4004
4005 fi
4006
4007 if test x != x"$MPILIBS"; then
4008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5
4009 $as_echo_n "checking for mpi.h... " >&6; }
4010        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4011 /* end confdefs.h.  */
4012 #include <mpi.h>
4013 int
4014 main ()
4015 {
4016
4017  ;
4018  return 0;
4019 }
4020 _ACEOF
4021 if ac_fn_cxx_try_compile "$LINENO"; then :
4022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4023 $as_echo "yes" >&6; }
4024 else
4025  MPILIBS=""
4026                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4027 $as_echo "no" >&6; }
4028 fi
4029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4030 fi
4031
4032 CXX="$ax_mpi_save_CXX"
4033
4034
4035
4036 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
4037 if test x = x"$MPILIBS"; then
4038        USE_MPI="no"
4039       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No suitable C++ MPI implementation found. openmd_MPI will not be built." >&5
4040 $as_echo "$as_me: WARNING: No suitable C++ MPI implementation found. openmd_MPI will not be built." >&2;}
4041        :
4042 else
4043        USE_MPI="yes"
4044        :
4045 fi
4046
4047 ac_ext=c
4048 ac_cpp='$CPP $CPPFLAGS'
4049 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4050 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4051 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4052 if test -n "$ac_tool_prefix"; then
4053  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4054 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4056 $as_echo_n "checking for $ac_word... " >&6; }
4057 if test "${ac_cv_prog_CC+set}" = set; then :
4058  $as_echo_n "(cached) " >&6
4059 else
4060  if test -n "$CC"; then
4061  ac_cv_prog_CC="$CC" # Let the user override the test.
4062 else
4063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4064 for as_dir in $PATH
4065 do
4066  IFS=$as_save_IFS
4067  test -z "$as_dir" && as_dir=.
4068    for ac_exec_ext in '' $ac_executable_extensions; do
4069  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4070    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4072    break 2
4073  fi
4074 done
4075  done
4076 IFS=$as_save_IFS
4077
4078 fi
4079 fi
4080 CC=$ac_cv_prog_CC
4081 if test -n "$CC"; then
4082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4083 $as_echo "$CC" >&6; }
4084 else
4085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4086 $as_echo "no" >&6; }
4087 fi
4088
4089
4090 fi
4091 if test -z "$ac_cv_prog_CC"; then
4092  ac_ct_CC=$CC
4093  # Extract the first word of "gcc", so it can be a program name with args.
4094 set dummy gcc; ac_word=$2
4095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4096 $as_echo_n "checking for $ac_word... " >&6; }
4097 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4098  $as_echo_n "(cached) " >&6
4099 else
4100  if test -n "$ac_ct_CC"; then
4101  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4102 else
4103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104 for as_dir in $PATH
4105 do
4106  IFS=$as_save_IFS
4107  test -z "$as_dir" && as_dir=.
4108    for ac_exec_ext in '' $ac_executable_extensions; do
4109  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4110    ac_cv_prog_ac_ct_CC="gcc"
4111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4112    break 2
4113  fi
4114 done
4115  done
4116 IFS=$as_save_IFS
4117
4118 fi
4119 fi
4120 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4121 if test -n "$ac_ct_CC"; then
4122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4123 $as_echo "$ac_ct_CC" >&6; }
4124 else
4125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4126 $as_echo "no" >&6; }
4127 fi
4128
4129  if test "x$ac_ct_CC" = x; then
4130    CC=""
4131  else
4132    case $cross_compiling:$ac_tool_warned in
4133 yes:)
4134 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4135 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4136 ac_tool_warned=yes ;;
4137 esac
4138    CC=$ac_ct_CC
4139  fi
4140 else
4141  CC="$ac_cv_prog_CC"
4142 fi
4143
4144 if test -z "$CC"; then
4145          if test -n "$ac_tool_prefix"; then
4146    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4147 set dummy ${ac_tool_prefix}cc; ac_word=$2
4148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4149 $as_echo_n "checking for $ac_word... " >&6; }
4150 if test "${ac_cv_prog_CC+set}" = set; then :
4151  $as_echo_n "(cached) " >&6
4152 else
4153  if test -n "$CC"; then
4154  ac_cv_prog_CC="$CC" # Let the user override the test.
4155 else
4156 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4157 for as_dir in $PATH
4158 do
4159  IFS=$as_save_IFS
4160  test -z "$as_dir" && as_dir=.
4161    for ac_exec_ext in '' $ac_executable_extensions; do
4162  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4163    ac_cv_prog_CC="${ac_tool_prefix}cc"
4164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4165    break 2
4166  fi
4167 done
4168  done
4169 IFS=$as_save_IFS
4170
4171 fi
4172 fi
4173 CC=$ac_cv_prog_CC
4174 if test -n "$CC"; then
4175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4176 $as_echo "$CC" >&6; }
4177 else
4178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4179 $as_echo "no" >&6; }
4180 fi
4181
4182
4183  fi
4184 fi
4185 if test -z "$CC"; then
4186  # Extract the first word of "cc", so it can be a program name with args.
4187 set dummy cc; ac_word=$2
4188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4189 $as_echo_n "checking for $ac_word... " >&6; }
4190 if test "${ac_cv_prog_CC+set}" = set; then :
4191  $as_echo_n "(cached) " >&6
4192 else
4193  if test -n "$CC"; then
4194  ac_cv_prog_CC="$CC" # Let the user override the test.
4195 else
4196  ac_prog_rejected=no
4197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4198 for as_dir in $PATH
4199 do
4200  IFS=$as_save_IFS
4201  test -z "$as_dir" && as_dir=.
4202    for ac_exec_ext in '' $ac_executable_extensions; do
4203  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4204    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4205       ac_prog_rejected=yes
4206       continue
4207     fi
4208    ac_cv_prog_CC="cc"
4209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4210    break 2
4211  fi
4212 done
4213  done
4214 IFS=$as_save_IFS
4215
4216 if test $ac_prog_rejected = yes; then
4217  # We found a bogon in the path, so make sure we never use it.
4218  set dummy $ac_cv_prog_CC
4219  shift
4220  if test $# != 0; then
4221    # We chose a different compiler from the bogus one.
4222    # However, it has the same basename, so the bogon will be chosen
4223    # first if we set CC to just the basename; use the full file name.
4224    shift
4225    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4226  fi
4227 fi
4228 fi
4229 fi
4230 CC=$ac_cv_prog_CC
4231 if test -n "$CC"; then
4232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4233 $as_echo "$CC" >&6; }
4234 else
4235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4236 $as_echo "no" >&6; }
4237 fi
4238
4239
4240 fi
4241 if test -z "$CC"; then
4242  if test -n "$ac_tool_prefix"; then
4243  for ac_prog in cl.exe
4244  do
4245    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4246 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4248 $as_echo_n "checking for $ac_word... " >&6; }
4249 if test "${ac_cv_prog_CC+set}" = set; then :
4250  $as_echo_n "(cached) " >&6
4251 else
4252  if test -n "$CC"; then
4253  ac_cv_prog_CC="$CC" # Let the user override the test.
4254 else
4255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4256 for as_dir in $PATH
4257 do
4258  IFS=$as_save_IFS
4259  test -z "$as_dir" && as_dir=.
4260    for ac_exec_ext in '' $ac_executable_extensions; do
4261  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4262    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4264    break 2
4265  fi
4266 done
4267  done
4268 IFS=$as_save_IFS
4269
4270 fi
4271 fi
4272 CC=$ac_cv_prog_CC
4273 if test -n "$CC"; then
4274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4275 $as_echo "$CC" >&6; }
4276 else
4277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4278 $as_echo "no" >&6; }
4279 fi
4280
4281
4282    test -n "$CC" && break
4283  done
4284 fi
4285 if test -z "$CC"; then
4286  ac_ct_CC=$CC
4287  for ac_prog in cl.exe
4288 do
4289  # Extract the first word of "$ac_prog", so it can be a program name with args.
4290 set dummy $ac_prog; ac_word=$2
4291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4292 $as_echo_n "checking for $ac_word... " >&6; }
4293 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4294  $as_echo_n "(cached) " >&6
4295 else
4296  if test -n "$ac_ct_CC"; then
4297  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4298 else
4299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4300 for as_dir in $PATH
4301 do
4302  IFS=$as_save_IFS
4303  test -z "$as_dir" && as_dir=.
4304    for ac_exec_ext in '' $ac_executable_extensions; do
4305  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4306    ac_cv_prog_ac_ct_CC="$ac_prog"
4307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4308    break 2
4309  fi
4310 done
4311  done
4312 IFS=$as_save_IFS
4313
4314 fi
4315 fi
4316 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4317 if test -n "$ac_ct_CC"; then
4318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4319 $as_echo "$ac_ct_CC" >&6; }
4320 else
4321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4322 $as_echo "no" >&6; }
4323 fi
4324
4325
4326  test -n "$ac_ct_CC" && break
4327 done
4328
4329  if test "x$ac_ct_CC" = x; then
4330    CC=""
4331  else
4332    case $cross_compiling:$ac_tool_warned in
4333 yes:)
4334 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4335 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4336 ac_tool_warned=yes ;;
4337 esac
4338    CC=$ac_ct_CC
4339  fi
4340 fi
4341
4342 fi
4343
4344
4345 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4346 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4347 as_fn_error "no acceptable C compiler found in \$PATH
4348 See \`config.log' for more details." "$LINENO" 5; }
4349
4350 # Provide some information about the compiler.
4351 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4352 set X $ac_compile
4353 ac_compiler=$2
4354 for ac_option in --version -v -V -qversion; do
4355  { { ac_try="$ac_compiler $ac_option >&5"
4356 case "(($ac_try" in
4357  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4358  *) ac_try_echo=$ac_try;;
4359 esac
4360 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4361 $as_echo "$ac_try_echo"; } >&5
4362  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4363  ac_status=$?
4364  if test -s conftest.err; then
4365    sed '10a\
4366 ... rest of stderr output deleted ...
4367         10q' conftest.err >conftest.er1
4368    cat conftest.er1 >&5
4369  fi
4370  rm -f conftest.er1 conftest.err
4371  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4372  test $ac_status = 0; }
4373 done
4374
4375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4376 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4377 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4378  $as_echo_n "(cached) " >&6
4379 else
4380  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4381 /* end confdefs.h.  */
4382
4383 int
4384 main ()
4385 {
4386 #ifndef __GNUC__
4387       choke me
4388 #endif
4389
4390  ;
4391  return 0;
4392 }
4393 _ACEOF
4394 if ac_fn_c_try_compile "$LINENO"; then :
4395  ac_compiler_gnu=yes
4396 else
4397  ac_compiler_gnu=no
4398 fi
4399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4400 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4401
4402 fi
4403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4404 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4405 if test $ac_compiler_gnu = yes; then
4406  GCC=yes
4407 else
4408  GCC=
4409 fi
4410 ac_test_CFLAGS=${CFLAGS+set}
4411 ac_save_CFLAGS=$CFLAGS
4412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4413 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4414 if test "${ac_cv_prog_cc_g+set}" = set; then :
4415  $as_echo_n "(cached) " >&6
4416 else
4417  ac_save_c_werror_flag=$ac_c_werror_flag
4418   ac_c_werror_flag=yes
4419   ac_cv_prog_cc_g=no
4420   CFLAGS="-g"
4421   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422 /* end confdefs.h.  */
4423
4424 int
4425 main ()
4426 {
4427
4428  ;
4429  return 0;
4430 }
4431 _ACEOF
4432 if ac_fn_c_try_compile "$LINENO"; then :
4433  ac_cv_prog_cc_g=yes
4434 else
4435  CFLAGS=""
4436      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4437 /* end confdefs.h.  */
4438
4439 int
4440 main ()
4441 {
4442
4443  ;
4444  return 0;
4445 }
4446 _ACEOF
4447 if ac_fn_c_try_compile "$LINENO"; then :
4448
4449 else
4450  ac_c_werror_flag=$ac_save_c_werror_flag
4451         CFLAGS="-g"
4452         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4453 /* end confdefs.h.  */
4454
4455 int
4456 main ()
4457 {
4458
4459  ;
4460  return 0;
4461 }
4462 _ACEOF
4463 if ac_fn_c_try_compile "$LINENO"; then :
4464  ac_cv_prog_cc_g=yes
4465 fi
4466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4467 fi
4468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4469 fi
4470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4471   ac_c_werror_flag=$ac_save_c_werror_flag
4472 fi
4473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4474 $as_echo "$ac_cv_prog_cc_g" >&6; }
4475 if test "$ac_test_CFLAGS" = set; then
4476  CFLAGS=$ac_save_CFLAGS
4477 elif test $ac_cv_prog_cc_g = yes; then
4478  if test "$GCC" = yes; then
4479    CFLAGS="-g -O2"
4480  else
4481    CFLAGS="-g"
4482  fi
4483 else
4484  if test "$GCC" = yes; then
4485    CFLAGS="-O2"
4486  else
4487    CFLAGS=
4488  fi
4489 fi
4490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4491 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4492 if test "${ac_cv_prog_cc_c89+set}" = set; then :
4493  $as_echo_n "(cached) " >&6
4494 else
4495  ac_cv_prog_cc_c89=no
4496 ac_save_CC=$CC
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498 /* end confdefs.h.  */
4499 #include <stdarg.h>
4500 #include <stdio.h>
4501 #include <sys/types.h>
4502 #include <sys/stat.h>
4503 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4504 struct buf { int x; };
4505 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4506 static char *e (p, i)
4507     char **p;
4508     int i;
4509 {
4510  return p[i];
4511 }
4512 static char *f (char * (*g) (char **, int), char **p, ...)
4513 {
4514  char *s;
4515  va_list v;
4516  va_start (v,p);
4517  s = g (p, va_arg (v,int));
4518  va_end (v);
4519  return s;
4520 }
4521
4522 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4523   function prototypes and stuff, but not '\xHH' hex character constants.
4524   These don't provoke an error unfortunately, instead are silently treated
4525   as 'x'.  The following induces an error, until -std is added to get
4526   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4527   array size at least.  It's necessary to write '\x00'==0 to get something
4528   that's true only with -std.  */
4529 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4530
4531 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4532   inside strings and character constants.  */
4533 #define FOO(x) 'x'
4534 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4535
4536 int test (int i, double x);
4537 struct s1 {int (*f) (int a);};
4538 struct s2 {int (*f) (double a);};
4539 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4540 int argc;
4541 char **argv;
4542 int
4543 main ()
4544 {
4545 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4546  ;
4547  return 0;
4548 }
4549 _ACEOF
4550 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4551        -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4552 do
4553  CC="$ac_save_CC $ac_arg"
4554  if ac_fn_c_try_compile "$LINENO"; then :
4555  ac_cv_prog_cc_c89=$ac_arg
4556 fi
4557 rm -f core conftest.err conftest.$ac_objext
4558  test "x$ac_cv_prog_cc_c89" != "xno" && break
4559 done
4560 rm -f conftest.$ac_ext
4561 CC=$ac_save_CC
4562
4563 fi
4564 # AC_CACHE_VAL
4565 case "x$ac_cv_prog_cc_c89" in
4566  x)
4567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4568 $as_echo "none needed" >&6; } ;;
4569  xno)
4570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4571 $as_echo "unsupported" >&6; } ;;
4572  *)
4573    CC="$CC $ac_cv_prog_cc_c89"
4574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4575 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4576 esac
4577 if test "x$ac_cv_prog_cc_c89" != xno; then :
4578
4579 fi
4580
4581 ac_ext=c
4582 ac_cpp='$CPP $CPPFLAGS'
4583 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4584 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4585 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4586
4587
4588 if test $USE_MPI != no; then :
4589
4590 ac_ext=c
4591 ac_cpp='$CPP $CPPFLAGS'
4592 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4593 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4594 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4595
4596
4597
4598
4599
4600
4601        for ac_prog in openmpicc mpicc hcc mpxlc_r mpxlc mpcc cmpicc
4602 do
4603  # Extract the first word of "$ac_prog", so it can be a program name with args.
4604 set dummy $ac_prog; ac_word=$2
4605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4606 $as_echo_n "checking for $ac_word... " >&6; }
4607 if test "${ac_cv_prog_MPICC+set}" = set; then :
4608  $as_echo_n "(cached) " >&6
4609 else
4610  if test -n "$MPICC"; then
4611  ac_cv_prog_MPICC="$MPICC" # Let the user override the test.
4612 else
4613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4614 for as_dir in $PATH
4615 do
4616  IFS=$as_save_IFS
4617  test -z "$as_dir" && as_dir=.
4618    for ac_exec_ext in '' $ac_executable_extensions; do
4619  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4620    ac_cv_prog_MPICC="$ac_prog"
4621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4622    break 2
4623  fi
4624 done
4625  done
4626 IFS=$as_save_IFS
4627
4628 fi
4629 fi
4630 MPICC=$ac_cv_prog_MPICC
4631 if test -n "$MPICC"; then
4632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC" >&5
4633 $as_echo "$MPICC" >&6; }
4634 else
4635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4636 $as_echo "no" >&6; }
4637 fi
4638
4639
4640  test -n "$MPICC" && break
4641 done
4642 test -n "$MPICC" || MPICC="$CC"
4643
4644        ax_mpi_save_CC="$CC"
4645        CC="$MPICC"
4646
4647
4648
4649 if test x = x"$MPILIBS"; then
4650        ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init"
4651 if test "x$ac_cv_func_MPI_Init" = x""yes; then :
4652  MPILIBS=" "
4653 fi
4654
4655 fi
4656
4657 if test x = x"$MPILIBS"; then
4658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5
4659 $as_echo_n "checking for MPI_Init in -lmpi... " >&6; }
4660 if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then :
4661  $as_echo_n "(cached) " >&6
4662 else
4663  ac_check_lib_save_LIBS=$LIBS
4664 LIBS="-lmpi  $LIBS"
4665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4666 /* end confdefs.h.  */
4667
4668 /* Override any GCC internal prototype to avoid an error.
4669   Use char because int might match the return type of a GCC
4670   builtin and then its argument prototype would still apply.  */
4671 #ifdef __cplusplus
4672 extern "C"
4673 #endif
4674 char MPI_Init ();
4675 int
4676 main ()
4677 {
4678 return MPI_Init ();
4679  ;
4680  return 0;
4681 }
4682 _ACEOF
4683 if ac_fn_c_try_link "$LINENO"; then :
4684  ac_cv_lib_mpi_MPI_Init=yes
4685 else
4686  ac_cv_lib_mpi_MPI_Init=no
4687 fi
4688 rm -f core conftest.err conftest.$ac_objext \
4689    conftest$ac_exeext conftest.$ac_ext
4690 LIBS=$ac_check_lib_save_LIBS
4691 fi
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5
4693 $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; }
4694 if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then :
4695  MPILIBS="-lmpi"
4696 fi
4697
4698 fi
4699 if test x = x"$MPILIBS"; then
4700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5
4701 $as_echo_n "checking for MPI_Init in -lmpich... " >&6; }
4702 if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then :
4703  $as_echo_n "(cached) " >&6
4704 else
4705  ac_check_lib_save_LIBS=$LIBS
4706 LIBS="-lmpich  $LIBS"
4707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4708 /* end confdefs.h.  */
4709
4710 /* Override any GCC internal prototype to avoid an error.
4711   Use char because int might match the return type of a GCC
4712   builtin and then its argument prototype would still apply.  */
4713 #ifdef __cplusplus
4714 extern "C"
4715 #endif
4716 char MPI_Init ();
4717 int
4718 main ()
4719 {
4720 return MPI_Init ();
4721  ;
4722  return 0;
4723 }
4724 _ACEOF
4725 if ac_fn_c_try_link "$LINENO"; then :
4726  ac_cv_lib_mpich_MPI_Init=yes
4727 else
4728  ac_cv_lib_mpich_MPI_Init=no
4729 fi
4730 rm -f core conftest.err conftest.$ac_objext \
4731    conftest$ac_exeext conftest.$ac_ext
4732 LIBS=$ac_check_lib_save_LIBS
4733 fi
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5
4735 $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; }
4736 if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then :
4737  MPILIBS="-lmpich"
4738 fi
4739
4740 fi
4741
4742 if test x != x"$MPILIBS"; then
4743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5
4744 $as_echo_n "checking for mpi.h... " >&6; }
4745        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4746 /* end confdefs.h.  */
4747 #include <mpi.h>
4748 int
4749 main ()
4750 {
4751
4752  ;
4753  return 0;
4754 }
4755 _ACEOF
4756 if ac_fn_c_try_compile "$LINENO"; then :
4757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4758 $as_echo "yes" >&6; }
4759 else
4760  MPILIBS=""
4761                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762 $as_echo "no" >&6; }
4763 fi
4764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4765 fi
4766
4767 CC="$ax_mpi_save_CC"
4768
4769
4770
4771 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
4772 if test x = x"$MPILIBS"; then
4773        USE_MPI="no"
4774       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No suitable C MPI implementation found. openmd_MPI will not be built." >&5
4775 $as_echo "$as_me: WARNING: No suitable C MPI implementation found. openmd_MPI will not be built." >&2;}
4776        :
4777 else
4778        USE_MPI="yes"
4779        :
4780 fi
4781
4782
4783 fi
4784 ac_ext=${ac_fc_srcext-f}
4785 ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
4786 ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
4787 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
4788 if test -n "$ac_tool_prefix"; then
4789  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
4790  do
4791    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4792 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4794 $as_echo_n "checking for $ac_word... " >&6; }
4795 if test "${ac_cv_prog_FC+set}" = set; then :
4796  $as_echo_n "(cached) " >&6
4797 else
4798  if test -n "$FC"; then
4799  ac_cv_prog_FC="$FC" # Let the user override the test.
4800 else
4801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802 for as_dir in $PATH
4803 do
4804  IFS=$as_save_IFS
4805  test -z "$as_dir" && as_dir=.
4806    for ac_exec_ext in '' $ac_executable_extensions; do
4807  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4808    ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
4809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4810    break 2
4811  fi
4812 done
4813  done
4814 IFS=$as_save_IFS
4815
4816 fi
4817 fi
4818 FC=$ac_cv_prog_FC
4819 if test -n "$FC"; then
4820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5
4821 $as_echo "$FC" >&6; }
4822 else
4823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4824 $as_echo "no" >&6; }
4825 fi
4826
4827
4828    test -n "$FC" && break
4829  done
4830 fi
4831 if test -z "$FC"; then
4832  ac_ct_FC=$FC
4833  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
4834 do
4835  # Extract the first word of "$ac_prog", so it can be a program name with args.
4836 set dummy $ac_prog; ac_word=$2
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4838 $as_echo_n "checking for $ac_word... " >&6; }
4839 if test "${ac_cv_prog_ac_ct_FC+set}" = set; then :
4840  $as_echo_n "(cached) " >&6
4841 else
4842  if test -n "$ac_ct_FC"; then
4843  ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test.
4844 else
4845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4846 for as_dir in $PATH
4847 do
4848  IFS=$as_save_IFS
4849  test -z "$as_dir" && as_dir=.
4850    for ac_exec_ext in '' $ac_executable_extensions; do
4851  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4852    ac_cv_prog_ac_ct_FC="$ac_prog"
4853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4854    break 2
4855  fi
4856 done
4857  done
4858 IFS=$as_save_IFS
4859
4860 fi
4861 fi
4862 ac_ct_FC=$ac_cv_prog_ac_ct_FC
4863 if test -n "$ac_ct_FC"; then
4864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5
4865 $as_echo "$ac_ct_FC" >&6; }
4866 else
4867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4868 $as_echo "no" >&6; }
4869 fi
4870
4871
4872  test -n "$ac_ct_FC" && break
4873 done
4874
4875  if test "x$ac_ct_FC" = x; then
4876    FC=""
4877  else
4878    case $cross_compiling:$ac_tool_warned in
4879 yes:)
4880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4881 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4882 ac_tool_warned=yes ;;
4883 esac
4884    FC=$ac_ct_FC
4885  fi
4886 fi
4887
4888
4889 # Provide some information about the compiler.
4890 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5
4891 set X $ac_compile
4892 ac_compiler=$2
4893 for ac_option in --version -v -V -qversion; do
4894  { { ac_try="$ac_compiler $ac_option >&5"
4895 case "(($ac_try" in
4896  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4897  *) ac_try_echo=$ac_try;;
4898 esac
4899 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4900 $as_echo "$ac_try_echo"; } >&5
4901  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4902  ac_status=$?
4903  if test -s conftest.err; then
4904    sed '10a\
4905 ... rest of stderr output deleted ...
4906         10q' conftest.err >conftest.er1
4907    cat conftest.er1 >&5
4908  fi
4909  rm -f conftest.er1 conftest.err
4910  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4911  test $ac_status = 0; }
4912 done
4913 rm -f a.out
4914
4915 # If we don't use `.F' as extension, the preprocessor is not run on the
4916 # input file.  (Note that this only needs to work for GNU compilers.)
4917 ac_save_ext=$ac_ext
4918 ac_ext=F
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5
4920 $as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
4921 if test "${ac_cv_fc_compiler_gnu+set}" = set; then :
4922  $as_echo_n "(cached) " >&6
4923 else
4924  cat > conftest.$ac_ext <<_ACEOF
4925      program main
4926 #ifndef __GNUC__
4927       choke me
4928 #endif
4929
4930      end
4931 _ACEOF
4932 if ac_fn_fc_try_compile "$LINENO"; then :
4933  ac_compiler_gnu=yes
4934 else
4935  ac_compiler_gnu=no
4936 fi
4937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4938 ac_cv_fc_compiler_gnu=$ac_compiler_gnu
4939
4940 fi
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5
4942 $as_echo "$ac_cv_fc_compiler_gnu" >&6; }
4943 ac_ext=$ac_save_ext
4944 ac_test_FCFLAGS=${FCFLAGS+set}
4945 ac_save_FCFLAGS=$FCFLAGS
4946 FCFLAGS=
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5
4948 $as_echo_n "checking whether $FC accepts -g... " >&6; }
4949 if test "${ac_cv_prog_fc_g+set}" = set; then :
4950  $as_echo_n "(cached) " >&6
4951 else
4952  FCFLAGS=-g
4953 cat > conftest.$ac_ext <<_ACEOF
4954      program main
4955
4956      end
4957 _ACEOF
4958 if ac_fn_fc_try_compile "$LINENO"; then :
4959  ac_cv_prog_fc_g=yes
4960 else
4961  ac_cv_prog_fc_g=no
4962 fi
4963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4964
4965 fi
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5
4967 $as_echo "$ac_cv_prog_fc_g" >&6; }
4968 if test "$ac_test_FCFLAGS" = set; then
4969  FCFLAGS=$ac_save_FCFLAGS
4970 elif test $ac_cv_prog_fc_g = yes; then
4971  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
4972    FCFLAGS="-g -O2"
4973  else
4974    FCFLAGS="-g"
4975  fi
4976 else
4977  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
4978    FCFLAGS="-O2"
4979  else
4980    FCFLAGS=
4981  fi
4982 fi
4983
4984 ac_ext=${ac_fc_srcext-f}
4985 ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
4986 ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
4987 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
4988
4989
4990 if test $USE_MPI != no; then :
4991
4992 ac_ext=${ac_fc_srcext-f}
4993 ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
4994 ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
4995 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
4996
4997
4998
4999
5000
5001
5002        for ac_prog in openmpif90 mpif90 mpxlf95_r mpxlf90_r mpxlf95 mpxlf90 mpf90 cmpif90c
5003 do
5004  # Extract the first word of "$ac_prog", so it can be a program name with args.
5005 set dummy $ac_prog; ac_word=$2
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5007 $as_echo_n "checking for $ac_word... " >&6; }
5008 if test "${ac_cv_prog_MPIFC+set}" = set; then :
5009  $as_echo_n "(cached) " >&6
5010 else
5011  if test -n "$MPIFC"; then
5012  ac_cv_prog_MPIFC="$MPIFC" # Let the user override the test.
5013 else
5014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5015 for as_dir in $PATH
5016 do
5017  IFS=$as_save_IFS
5018  test -z "$as_dir" && as_dir=.
5019    for ac_exec_ext in '' $ac_executable_extensions; do
5020  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5021    ac_cv_prog_MPIFC="$ac_prog"
5022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5023    break 2
5024  fi
5025 done
5026  done
5027 IFS=$as_save_IFS
5028
5029 fi
5030 fi
5031 MPIFC=$ac_cv_prog_MPIFC
5032 if test -n "$MPIFC"; then
5033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC" >&5
5034 $as_echo "$MPIFC" >&6; }
5035 else
5036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5037 $as_echo "no" >&6; }
5038 fi
5039
5040
5041  test -n "$MPIFC" && break
5042 done
5043 test -n "$MPIFC" || MPIFC="$FC"
5044
5045        ax_mpi_save_FC="$FC"
5046        FC="$MPIFC"
5047
5048
5049
5050 if test x = x"$MPILIBS"; then
5051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5
5052 $as_echo_n "checking for MPI_Init... " >&6; }
5053                        cat > conftest.$ac_ext <<_ACEOF
5054      program main
5055      call MPI_Init
5056      end
5057 _ACEOF
5058 if ac_fn_fc_try_link "$LINENO"; then :
5059  MPILIBS=" "
5060                                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5061 $as_echo "yes" >&6; }
5062 else
5063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064 $as_echo "no" >&6; }
5065 fi
5066 rm -f core conftest.err conftest.$ac_objext \
5067    conftest$ac_exeext conftest.$ac_ext
5068 fi
5069
5070        if test x = x"$MPILIBS"; then
5071                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lfmpi" >&5
5072 $as_echo_n "checking for MPI_Init in -lfmpi... " >&6; }
5073 if test "${ac_cv_lib_fmpi_MPI_Init+set}" = set; then :
5074  $as_echo_n "(cached) " >&6
5075 else
5076  ac_check_lib_save_LIBS=$LIBS
5077 LIBS="-lfmpi  $LIBS"
5078 cat > conftest.$ac_ext <<_ACEOF
5079      program main
5080      call MPI_Init
5081      end
5082 _ACEOF
5083 if ac_fn_fc_try_link "$LINENO"; then :
5084  ac_cv_lib_fmpi_MPI_Init=yes
5085 else
5086  ac_cv_lib_fmpi_MPI_Init=no
5087 fi
5088 rm -f core conftest.err conftest.$ac_objext \
5089    conftest$ac_exeext conftest.$ac_ext
5090 LIBS=$ac_check_lib_save_LIBS
5091 fi
5092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fmpi_MPI_Init" >&5
5093 $as_echo "$ac_cv_lib_fmpi_MPI_Init" >&6; }
5094 if test "x$ac_cv_lib_fmpi_MPI_Init" = x""yes; then :
5095  MPILIBS="-lfmpi"
5096 fi
5097
5098        fi
5099        if test x = x"$MPILIBS"; then
5100                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpichf90" >&5
5101 $as_echo_n "checking for MPI_Init in -lmpichf90... " >&6; }
5102 if test "${ac_cv_lib_mpichf90_MPI_Init+set}" = set; then :
5103  $as_echo_n "(cached) " >&6
5104 else
5105  ac_check_lib_save_LIBS=$LIBS
5106 LIBS="-lmpichf90  $LIBS"
5107 cat > conftest.$ac_ext <<_ACEOF
5108      program main
5109      call MPI_Init
5110      end
5111 _ACEOF
5112 if ac_fn_fc_try_link "$LINENO"; then :
5113  ac_cv_lib_mpichf90_MPI_Init=yes
5114 else
5115  ac_cv_lib_mpichf90_MPI_Init=no
5116 fi
5117 rm -f core conftest.err conftest.$ac_objext \
5118    conftest$ac_exeext conftest.$ac_ext
5119 LIBS=$ac_check_lib_save_LIBS
5120 fi
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpichf90_MPI_Init" >&5
5122 $as_echo "$ac_cv_lib_mpichf90_MPI_Init" >&6; }
5123 if test "x$ac_cv_lib_mpichf90_MPI_Init" = x""yes; then :
5124  MPILIBS="-lmpichf90"
5125 fi
5126
5127        fi
5128
5129 if test x = x"$MPILIBS"; then
5130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5
5131 $as_echo_n "checking for MPI_Init in -lmpi... " >&6; }
5132 if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then :
5133  $as_echo_n "(cached) " >&6
5134 else
5135  ac_check_lib_save_LIBS=$LIBS
5136 LIBS="-lmpi  $LIBS"
5137 cat > conftest.$ac_ext <<_ACEOF
5138      program main
5139      call MPI_Init
5140      end
5141 _ACEOF
5142 if ac_fn_fc_try_link "$LINENO"; then :
5143  ac_cv_lib_mpi_MPI_Init=yes
5144 else
5145  ac_cv_lib_mpi_MPI_Init=no
5146 fi
5147 rm -f core conftest.err conftest.$ac_objext \
5148    conftest$ac_exeext conftest.$ac_ext
5149 LIBS=$ac_check_lib_save_LIBS
5150 fi
5151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5
5152 $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; }
5153 if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then :
5154  MPILIBS="-lmpi"
5155 fi
2971  
2972 < fi
2973 < if test x = x"$MPILIBS"; then
2974 <        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5
2975 < $as_echo_n "checking for MPI_Init in -lmpich... " >&6; }
2976 < if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then :
2977 <  $as_echo_n "(cached) " >&6
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 <  ac_check_lib_save_LIBS=$LIBS
5165 < LIBS="-lmpich  $LIBS"
5166 < cat > conftest.$ac_ext <<_ACEOF
5167 <      program main
5168 <      call MPI_Init
5169 <      end
5170 < _ACEOF
5171 < if ac_fn_fc_try_link "$LINENO"; then :
5172 <  ac_cv_lib_mpich_MPI_Init=yes
5173 < else
5174 <  ac_cv_lib_mpich_MPI_Init=no
2982 >  OPENMD_HOME=${prefix}/openmd
2983   fi
2984 < rm -f core conftest.err conftest.$ac_objext \
2985 <    conftest$ac_exeext conftest.$ac_ext
2986 < LIBS=$ac_check_lib_save_LIBS
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
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5
5181 $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; }
5182 if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then :
5183  MPILIBS="-lmpich"
5184 fi
2988  
5186 fi
2989  
2990 < if test x != x"$MPILIBS"; then
2991 <        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpif.h" >&5
2992 < $as_echo_n "checking for mpif.h... " >&6; }
2993 <        cat > conftest.$ac_ext <<_ACEOF
2994 <      program main
2995 <      include 'mpif.h'
2996 <      end
5195 < _ACEOF
5196 < if ac_fn_fc_try_compile "$LINENO"; then :
5197 <  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5198 < $as_echo "yes" >&6; }
5199 < else
5200 <  MPILIBS=""
5201 <                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5202 < $as_echo "no" >&6; }
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
5204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5205 fi
2998  
2999 < FC="$ax_mpi_save_FC"
2999 > if test "${DEBUG}"; then
3000  
3001 + $as_echo "#define debug 1" >>confdefs.h
3002  
3003 +  msg="$msg, debug mode"
3004 + fi
3005  
3006 < # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
3007 < if test x = x"$MPILIBS"; then
3008 <        USE_MPI="no"
3009 <       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No suitable Fortran MPI implementation found. openmd_MPI will not be built." >&5
5215 < $as_echo "$as_me: WARNING: No suitable Fortran MPI implementation found. openmd_MPI will not be built." >&2;}
5216 <        :
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 <        USE_MPI="yes"
5219 <        :
3011 >  ok=no
3012   fi
3013  
3014 <
3014 > # Check whether --enable-float was given.
3015 > if test "${enable_float+set}" = set; then :
3016 >  enableval=$enable_float; ok=$enableval
3017   fi
5224 if test $USE_MPI != no; then :
3018  
3019 <        CXX=$MPICXX
5227 <        CC=$MPICC
5228 <        FC=$MPIFC
3019 > if test "$ok" = "yes"; then
3020  
3021 < fi
3021 > $as_echo "#define SINGLE_PRECISION 1" >>confdefs.h
3022  
3023 +        USE_SINGLE_PRECISION=yes
3024  
3025 < # Checks for programs.
3025 > fi
3026 >
3027   ac_ext=cpp
3028   ac_cpp='$CXXCPP $CPPFLAGS'
3029   ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
# Line 5365 | Line 3158 | $as_echo "$ac_try_echo"; } >&5
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 confdefs.h - <<_ACEOF >conftest.$ac_ext
3164 + /* end confdefs.h.  */
3165 +
3166 + int
3167 + main ()
3168 + {
3169 +
3170 +  ;
3171 +  return 0;
3172 + }
3173 + _ACEOF
3174 + ac_clean_files_save=$ac_clean_files
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 + { $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 + # 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 | *.map | *.inf | *.dSYM | *.o | *.obj )
3217 +        ;;
3218 +    [ab].out )
3219 +        # We found the default executable, but exeext='' is most
3220 +        # certainly right.
3221 +        break;;
3222 +    *.* )
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 +  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 + { { $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 + { $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
3262 +
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 + { $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 +  $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
3281 + # `rm'.
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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3286 +    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3287 +          break;;
3288 +    * ) break;;
3289 +  esac
3290 + done
3291 + else
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 +
3301 + rm -f conftest.$ac_ext
3302 + EXEEXT=$ac_cv_exeext
3303 + ac_exeext=$EXEEXT
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 + 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
3372 + main ()
3373 + {
3374 +
3375 +  ;
3376 +  return 0;
3377 + }
3378 + _ACEOF
3379 + rm -f conftest.o conftest.obj
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 +  $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 | *.map | *.inf | *.dSYM ) ;;
3395 +    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3396 +       break;;
3397 +  esac
3398 + done
3399 + else
3400 +  $as_echo "$as_me: failed program was:" >&5
3401 + sed 's/^/| /' conftest.$ac_ext >&5
3402 +
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
3408 + rm -f conftest.$ac_cv_objext conftest.$ac_ext
3409 + fi
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   { $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 :
# Line 5482 | Line 3526 | fi
3526      CXXFLAGS=
3527    fi
3528   fi
3529 < ac_ext=${ac_fc_srcext-f}
3530 < ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
3531 < ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
3532 < ac_compiler_gnu=$ac_cv_fc_compiler_gnu
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   ac_ext=c
3536   ac_cpp='$CPP $CPPFLAGS'
# Line 5829 | Line 3874 | fi
3874  
3875   fi
3876  
3877 < ac_ext=${ac_fc_srcext-f}
3878 < ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
3879 < ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
3880 < ac_compiler_gnu=$ac_cv_fc_compiler_gnu
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   ac_ext=${ac_fc_srcext-f}
3884   ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
# Line 6031 | Line 4077 | else
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'
4086 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
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 +
4102 +
4103 +
4104 +
4105 +
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   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  
4145 +
4146 +  test -n "$MPICXX" && break
4147 + done
4148 + test -n "$MPICXX" || MPICXX="$CXX"
4149 +
4150 +        ax_mpi_save_CXX="$CXX"
4151 +        CXX="$MPICXX"
4152 +
4153 +
4154 +
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 + 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 + /* 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 +  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 +
4204 + fi
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 + /* 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 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 +  ;
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 +
4288 +
4289 + if test $USE_MPI != no; then :
4290 +
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 +
4297 +
4298 +
4299 +
4300 +
4301 +
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 +
4340 +
4341 +  test -n "$MPICC" && break
4342 + done
4343 + test -n "$MPICC" || MPICC="$CC"
4344 +
4345 +        ax_mpi_save_CC="$CC"
4346 +        CC="$MPICC"
4347 +
4348 +
4349 +
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 +
4356 + fi
4357 +
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 + /* 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 +
4441 + fi
4442 +
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 +  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 + CC="$ax_mpi_save_CC"
4469 +
4470 +
4471 +
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 +
4483 +
4484 + fi
4485 +
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 +
4493 +
4494 +
4495 +
4496 +
4497 +
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 +
4525 + fi
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 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533 + $as_echo "no" >&6; }
4534 + fi
4535 +
4536 +
4537 +  test -n "$MPIFC" && break
4538 + done
4539 + test -n "$MPIFC" || MPIFC="$FC"
4540 +
4541 +        ax_mpi_save_FC="$FC"
4542 +        FC="$MPIFC"
4543 +
4544 +
4545 +
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 +        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 +        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 +        fi
4624 +
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_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 + 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 +  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_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 + fi
4683 +
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 +  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 + FC="$ax_mpi_save_FC"
4704 +
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 +        USE_MPI="yes"
4715 +        :
4716 + fi
4717 +
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'
# Line 6656 | Line 5353 | esac
5353     x/*) ;;
5354     *) INSTALL=`pwd`/ac-tools/"shtool install -c" ;
5355   esac
5356 < MKINSTALLDIRS=`pwd`/ac-tools/"shtool mkdir -p -f"
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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines