forked from NOAA-GFDL/TCtracker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
106 lines (90 loc) · 3.68 KB
/
configure.ac
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
# **********************************************************************
# TCtracker - Tropical Storm Detection
# Copyright (C) 1997-2008, 2021 Frederic Vitart, Joe Sirutis, Ming Zhao,
# Kyle Olivo, Keren Rosado and Seth Underwood
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# **********************************************************************
AC_PREREQ([2.69])
AC_INIT([GFDL Tropical Storms Detection],
[2.0.0-alpha.4],
[gfdl.climate.model.info@noaa.gov],
[TCtracker],
[https://www.gfdl.noaa.gov/tstorms/])
AC_CONFIG_SRCDIR([tstorms_driver/tstorms_drive.f90])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign tar-pax subdir-objects])
# Installer can set location of ibtracs_dir. If not set at configure time
# user will need to set IBTRACS_DIR or use the -O option.
AC_ARG_WITH([ibtracs],
[AS_HELP_STRING([--with-ibtracs=[path]],
[Use ibtracs path as default ibtracs_dir])],
[test -d "$with_ibtracs" || AC_MSG_WARN([ibtracs directory '$with_ibtracs' does not exist])],
[with_ibtracs='Not set'])
AC_SUBST([ibtracs_dir], [$with_ibtracs])
AC_PROG_SED
AC_PATH_PROG([GRACEBAT], [gracebat], [none])
AS_IF([test "$GRACEBAT" = "none"],
[AC_MSG_ERROR([Unable to find gracebat command in PATH])])
AC_PROG_FC([gfortran ifort])
AC_FC_MODULE_FLAG
AC_FC_MODULE_EXTENSION
AC_FC_MODULE_OUTPUT_FLAG
AC_FC_FREEFORM()
AC_FC_LINE_LENGTH([unlimited])
AC_PROG_INSTALL
AC_FC_FREEFORM()
AC_LANG_PUSH([Fortran])
AX_LIB_NETCDFF()
AS_IF([test "$with_netcdf_fortran" = "no"],
[AC_MSG_ERROR([Unable to find NetCDF Fortran library.])])
AC_LANG_POP([Fortran])
# Check for the NCO used tools
AC_PATH_PROG([NCRCAT], [ncrcat], [none])
AS_IF([test "$NCRCAT" == "none"],
[AC_MSG_ERROR([Unable to find ncrcat in PATH])])
# Check that python3 and python packages are available
AM_PATH_PYTHON([3.6])
AX_PYTHON_MODULE([jinja2], [t])
AX_PYTHON_MODULE([pyferret], [t])
AX_PYTHON_MODULE([scipy.io], [t])
# f2py for python/Fortran functionality
AC_CHECK_PROGS([F2PY], [f2py3 f2py], [none])
AS_IF([test "$F2PY" == "none"],
[AC_MSG_ERROR([Unable to find f2py in PATH])])
# Get the Python extension for extension libraries
AC_CHECK_PROGS([PYTHON_CONFIG], [python3-config python-config], [none])
AS_IF([test "$PYTHON_CONFIG" == "none"],
[AC_MSG_ERROR([Unable to find python-config in PATH])])
AC_MSG_CHECKING([for python's extension suffix])
AC_SUBST([PYTHON_EXTENSION_SUFFIX],[$(eval $PYTHON_CONFIG --extension-suffix)])
AC_MSG_RESULT([$PYTHON_EXTENSION_SUFFIX])
# Define the directory where *.mod files will reside.
# Used in Makefiles.
AC_SUBST([MODDIR],[.mods])
AC_CONFIG_FILES([Makefile
plot_tc_csc/Makefile
plot_tc_csc/tstorms/Makefile
plot_tc_csc/tstorms/ori/Makefile
plot_tc_csc/tstorms/plots/Makefile
plot_tc_csc/tstorms/plots/templates/Makefile
plot_tc_csc/tstorms/traj/Makefile
share/Makefile
share/ferret_jnl/Makefile
trajectory_analysis/Makefile
tstorms_driver/Makefile
])
AC_OUTPUT