-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
173 lines (143 loc) · 4.85 KB
/
configure.ac
File metadata and controls
173 lines (143 loc) · 4.85 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
###################################################################
# $Id: $
###################################################################
AC_INIT(pest3code,3.3,pletzer@txcorp.com)
AC_PREREQ([2.59])
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
dnl ######################################################################
dnl
dnl Compilers
dnl
dnl ######################################################################
AC_PROG_FC
AC_PROG_CXX
AC_PROG_CC
LT_INIT
AC_PROG_LIBTOOL
AC_PROG_INSTALL
# Default prefix
AC_PREFIX_DEFAULT(/internal/nubeam)
# Do not automatically regenerate Makefile.in's
AM_MAINTAINER_MODE
# Prevent testing executables as fails on parallel machines
# all subsequent test files will be .f90
AC_LANG_PUSH(Fortran)
AC_FC_SRCEXT([f90])
dnl###################################################################
dnl BLAS
dnl###################################################################
searchdirs="/usr/lib /usr/lib64"
BLAS_LIB="NotSet"
AC_ARG_WITH([blas-lib],
[AS_HELP_STRING([--with-blas-lib=<blas-lib>],
[full path to BLAS library])],
BLAS_LIB="$withval")
if test "$BLAS_LIB" = "NotSet"; then
for dir in $searchdirs; do
AC_CHECK_FILE($dir/libblas.a,
BLAS_LIB="$dir/libblas.a")
done
fi
if test "$BLAS_LIB" = "NotSet"; then
AC_MSG_ERROR([Cannot find location of BLAS library. Consider using --with-blas-lib=<...>])
fi
AC_SUBST([BLAS_LIB],["$BLAS_LIB"])
dnl###################################################################
dnl LAPACK
dnl###################################################################
searchdirs="/usr/lib /usr/lib64"
LAPACK_LIB="NotSet"
AC_ARG_WITH([lapack-lib],
[AS_HELP_STRING([--with-lapack-lib=<lapack-lib>],
[full path to LAPACK library])],
LAPACK_LIB="$withval")
if test "$LAPACK_LIB" = "NotSet"; then
for dir in $searchdirs; do
AC_CHECK_FILE($dir/liblapack.a,
LAPACK_LIB="$dir/liblapack.a")
done
fi
if test "$LAPACK_LIB" = "NotSet"; then
AC_MSG_ERROR([Cannot find location of LAPACK library. Consider using --with-lapack-lib=<...>])
fi
AC_SUBST([LAPACK_LIB],["$LAPACK_LIB"])
dnl###################################################################
dnl NetCDF
dnl###################################################################
searchdirs="/usr/local/ /usr $HOME/software /opt/netcdf"
NETCDF_DIR="NotSet"
AC_ARG_WITH([netcdf-dir],
[AS_HELP_STRING([--with-netcdf-dir=<netcdf-dir>],
[location of NETCDF directory])],
NETCDF_DIR="$withval")
if test "$NETCDF_DIR" = "NotSet"; then
for dir in $searchdirs; do
AC_CHECK_FILE($dir/lib/libpspline.a,
NETCDF_DIR="$dir")
done
fi
if test "$NETCDF_DIR" = "NotSet"; then
AC_MSG_ERROR([Cannot find location of NETCDF libraries. Consider using --with-netcdf-dir=<...>])
fi
AC_SUBST([NETCDF_DIR],["$NETCDF_DIR"])
dnl ##################################################################
dnl MDSPLUS libraries
dnl ##################################################################
searchdirs="/usr/mdsplus /usr/local/mdsplus /opt/mdsplus"
MDSPLUS_LIBS=""
MDSPLUS_DIR="NotSet"
AC_ARG_WITH([mdsplus-dir],
[AS_HELP_STRING([--with-mdsplus-dir=<mdsplus-dir>],
[location of MDSPLUS directory])],
MDSPLUS_DIR="$withval")
if test "$MDSPLUS_DIR" = "NotSet"; then
for dir in $searchdirs; do
AC_CHECK_FILES($dir/lib/libTreeShr.so,
MDSPLUS_DIR="$dir")
done
fi
if test "$MDSPLUS_DIR" = "NotSet"; then
AC_MSG_WARN([Could not find location of MDSPLUS libraries. Consider using --with-mdsplus-dir=<...>])
else
MDSPLUS_LIBS="-L$MDSPLUS_DIR -lTreeShr -lMdsShr -lTdiShr"
fi
AC_SUBST([MDSPLUS_LIBS],["$MDSPLUS_LIBS"])
dnl ##################################################################
dnl NTCC libraries
dnl ##################################################################
searchdirs="$HOME/ntcc /usr/local/ntcc"
NTCC_DIR="NotSet"
AC_ARG_WITH([ntcc-dir],
[AS_HELP_STRING([--with-ntcc-dir=<ntcc-dir>],
[location of NTCC directory])],
NTCC_DIR="$withval")
if test "$NTCC_DIR" = "NotSet"; then
for dir in $searchdirs; do
AC_CHECK_FILE($dir/lib/libpspline.a,
NTCC_DIR="$dir")
done
fi
if test "$NTCC_DIR" = "NotSet"; then
AC_MSG_ERROR([Cannot find location of NTCC libraries. Consider using --with-ntcc-dir=<...>])
fi
AC_SUBST([NTCC_DIR],["$NTCC_DIR"])
######################################################################
# Mixed Fortran C/C++
######################################################################
# determine the fortran libraries
AC_FC_LIBRARY_LDFLAGS
# determine the name of the object file that initializes fortran
# IO, etc
#builtin(include, config/tx_fc_find_main.m4)
# this will set $TX_FC_MAIN_OBJS
#TX_FC_FIND_MAIN_OBJS
######################################################################
# Create Makefiles
######################################################################
AC_CONFIG_FILES(
[Makefile]
[pest3/Makefile]
)
AC_OUTPUT