[cgma-dev] r3891 - cgm/trunk/m4
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Wed May 12 17:10:03 CDT 2010
Author: kraftche
Date: 2010-05-12 17:10:02 -0500 (Wed, 12 May 2010)
New Revision: 3891
Modified:
cgm/trunk/m4/compiler.m4
Log:
sync compiler config with MOAB
Modified: cgm/trunk/m4/compiler.m4
===================================================================
--- cgm/trunk/m4/compiler.m4 2010-05-12 22:08:09 UTC (rev 3890)
+++ cgm/trunk/m4/compiler.m4 2010-05-12 22:10:02 UTC (rev 3891)
@@ -14,6 +14,31 @@
rm .tmp
])
+
+########## Helper function for FATHOM_CHECK_COMPILERS #############
+# args: compiler variable, compiler list, path
+AC_DEFUN([FATHOM_SET_MPI_COMPILER], [
+ if test "x" = "x${$1}"; then
+ if test "x" = "x$3"; then
+ AC_CHECK_PROGS([$1], [$2], [false])
+ else
+ $1=false
+ for prog in $2 ; do
+ if test -x "$3/$prog"; then
+ $1="$3/$prog"
+ AC_SUBST($1)
+ export $1
+ break
+ fi
+ done
+ fi
+
+ if test "x${$1}" = "xfalse"; then
+ AC_MSG_ERROR([Cannot find MPI compiler. Try specifying \$$1])
+ fi
+ fi
+])
+
#######################################################################################
# Implement checks for C and C++ compilers, with all corresponding options
#
@@ -52,91 +77,38 @@
# Need to check this early so we can look for the correct compiler
AC_ARG_WITH( [mpi], AC_HELP_STRING([[--with-mpi(=DIR)]], [Enable parallel support]),
[WITH_MPI=$withval],[WITH_MPI=no] )
-case "x$WITH_MPI" in
- xno)
- CC_LIST=
- CXX_LIST=
- FC_LIST=
- F77_LIST=
- ;;
- xyes)
- CC_LIST="mpicc mpcc"
- CXX_LIST="mpiCC mpCC mpicxx"
- FC_LIST="mpif90"
More information about the cgma-dev
mailing list