forked from ESMCI/mpi-serial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
91 lines (77 loc) · 2.64 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
dnl initialize autoconf
AC_INIT(mpi.h)
dnl specify config header file
AC_CONFIG_HEADER(config.h)
dnl find c compiler, and fort compiler
AC_PROG_CC
AC_PROG_FC
# ARCHIVE COMMAND SIMILAR ACROSS ALL PLATFORMS
AC_ARG_VAR(AR,Archive Command)
if test -z "$AR"; then
AR="ar cruv"
fi
# RANLIB
AC_ARG_VAR(RANLIB,Archive index update command)
if test -z "$RANLIB"; then
# Necessary on Darwin to deal with common symbols (particularly when
# using ifort).
if test "$SYSDEF"x = DARWINx; then
RANLIB="ranlib -c"
else
AC_PROG_RANLIB
fi
fi
dnl determine fortran name-mangling
dnl result functions end up in config.h
AC_FC_WRAPPERS
dnl to determine type of integer needed for fortran
AC_CHECK_SIZEOF(long)
dnl these are to specify the possible arguments to configure.
AC_ARG_ENABLE([test-internal],
[ --enable-test-internal Specify internal test as opposed to full suite test]
,AC_DEFINE([TEST_INTERNAL],[],
[Perform tests on data copies internally instead of using MPI_Send]))
AC_ARG_ENABLE([info],[ --enable-info Print extra debugging info],
AC_DEFINE([INFO],[],[Print extra debug info]))
AC_ARG_ENABLE([fort-real],
[ --enable-fort-real=SIZE Specify Fortran real size],
AC_DEFINE_UNQUOTED([CONFIG_FORT_REAL],[$enable_fort_real],
[User-set Fortran real size]))
AC_ARG_ENABLE([fort-double],
[ --enable-fort-double=SIZE Specify Fortran double size],
AC_DEFINE_UNQUOTED([CONFIG_FORT_DOUBLE],[$enable_fort_double],
[User-set Fortran double size]))
AC_ARG_ENABLE([type-checking],
[ --enable-type-checking Perform type checking during communications],
AC_DEFINE([TYPE_CHECKING],[],[Perform type checking during communications]))
# Determine flag for fortran module include path
# taken from the MCT configure
AC_ARG_VAR(INCLUDEFLAG,Fortran compiler flag for specifying module search path)
AC_LANG_PUSH(Fortran)
AX_FC_VERSION()
AC_LANG_POP(Fortran)
if echo $ac_fc_version_output | grep -i absoft >/dev/null 2>&1; then
echo "Fortran Compiler is Absoft"
if test -z "$INCLUDEFLAG"; then
INCLUDEFLAG="-p"
fi
elif echo $ac_fc_version_output | grep -i workshop >/dev/null 2>&1; then
echo "Fortran Compiler is Workshop"
if test -z "$INCLUDEFLAG"; then
INCLUDEFLAG="-M"
fi
elif echo $ac_fc_version_output | grep -i pgf >/dev/null 2>&1; then
echo "Fortran Compiler is Portland Group"
LIBS="$LIBS -pgf90libs"
elif echo $ac_fc_version_output | grep -i nag >/dev/null 2>&1; then
echo "Fortran Compiler is NAG"
CPRDEF="NAG"
if test -z "$FCFLAGS"; then
FCFLAGS="-mismatch"
fi
fi
# INCLUDE FLAG IF NOT ALREADY SET IS MOST LIKELY -I
if test -z "$INCLUDEFLAG"; then
INCLUDEFLAG="-I"
fi
AC_OUTPUT(Makefile.conf)