Commits
Darrell Schiebel authored a38e73698c0
74 74 | ;; |
75 75 | *) |
76 76 | AC_MSG_ERROR([cannot find a C++ compiler that supports C++11, please include the path to one in your PATH environment variable]) |
77 77 | ;; |
78 78 | esac |
79 79 | |
80 80 | if [[ "${ac_success}" = "no" ]]; then |
81 81 | AC_MSG_ERROR([cannot find a C++ compiler that supports C++11, please include the path to one in your PATH environment variable]) |
82 82 | fi |
83 83 | fi |
84 + | |
84 85 | if [[ ! -e "${CXX}" ]]; then |
85 86 | CXX=`which ${CXX}` |
86 87 | fi |
87 88 | if [[ -x "${CXX}" ]]; then |
88 89 | AC_MSG_NOTICE([C++11 compiler ${CXX}]) |
89 90 | else |
90 91 | AC_MSG_ERROR([failed to find viable C++11 compiler, please include the path to one in your PATH environment variable]) |
91 92 | fi |
92 93 | |
93 94 | AC_MSG_CHECKING([for std::defaultfloat]) |
94 95 | AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <ios>]], |
95 96 | [[std::defaultfloat;]])], |
96 97 | [AC_MSG_RESULT([yes])], |
97 98 | [AC_MSG_RESULT([no]) |
98 99 | AC_MSG_ERROR([C++ compiler is not new enough]) ] ) |
99 100 | |
100 - | if [[ "${SYSTEM_GRPC}" == "1" ]]; then |
101 - | PKG_CHECK_MODULES( [GRPC], [grpc >= 6.0.0 grpc++ >= 1.16.1 protobuf >= 3.6.1 ], [ |
102 - | AC_CHECK_PROGS([PROTOC], [protoc], [/usr/bin/false]) |
103 - | if test "$PROTOC" = "/usr/bin/false"; then |
104 - | AC_MSG_FAILURE([grpc requested but protoc not found.]) |
105 - | else |
106 - | PROTOC=`which protoc` |
107 - | fi |
108 - | AC_CHECK_PROGS([GRPC_CPP_PLUGIN], [grpc_cpp_plugin], [/usr/bin/false]) |
109 - | if test "$GRPC_CPP_PLUGIN" = "/usr/bin/false"; then |
110 - | AC_MSG_FAILURE([grpc requested but grpc plugin for C++ not found.]) |
111 - | else |
112 - | GRPC_CPP_PLUGIN=`which grpc_cpp_plugin` |
113 - | fi ] ) |
114 - | GRPC_DO_BUILD=0 |
115 - | else |
116 - | GRPC_DO_BUILD=1 |
117 - | PROTOC="/usr/bin/false" |
118 - | GRPC_CPP_PLUGIN="/usr/bin/false" |
119 - | fi |
120 - | AC_SUBST(GRPC_CFLAGS) |
121 - | AC_SUBST(GRPC_LIBS) |
122 - | AC_SUBST(GRPC_DO_BUILD) |
123 - | AC_SUBST(PROTOC) |
124 101 | |
125 102 | dnl Add --with-mpi option to configure |
126 103 | AC_ARG_WITH(mpi, [AS_HELP_STRING([--with-mpi], |
127 104 | [compile with MPI (parallelization) support. Auto: if no MPI compiler/libraries are |
128 105 | found, MPI is not used. Default: auto]) |
129 106 | ],, |
130 107 | [with_mpi=auto]) |
131 108 | |
132 109 | dnl Try to find an MPI compiler wrapper. Far from ideal. |
133 110 | dnl AC_PROG_CXX_MPI is meant to be used intead of AC_PROG_CXX for MPI applications. |
291 268 | fi |
292 269 | AX_PATH_TO_BINARY(bison,BISON) |
293 270 | |
294 271 | AX_PTHREAD |
295 272 | AX_CFITSIO |
296 273 | AX_WCSLIB |
297 274 | AX_RPFITS |
298 275 | AX_GSL(2.0) |
299 276 | AX_SWIG(3.0.0) |
300 277 | |
278 + | if [[ "${SYSTEM_GRPC}" == "1" ]]; then |
279 + | PKG_CHECK_MODULES( [GRPC], [grpc >= 6.0.0 grpc++ >= 1.16.1 protobuf >= 3.6.1 ], [ |
280 + | AC_CHECK_PROGS([PROTOC], [protoc], [/usr/bin/false]) |
281 + | if test "$PROTOC" = "/usr/bin/false"; then |
282 + | AC_MSG_FAILURE([grpc requested but protoc not found.]) |
283 + | else |
284 + | PROTOC=`which protoc` |
285 + | fi |
286 + | AC_CHECK_PROGS([GRPC_CPP_PLUGIN], [grpc_cpp_plugin], [/usr/bin/false]) |
287 + | if test "$GRPC_CPP_PLUGIN" = "/usr/bin/false"; then |
288 + | AC_MSG_FAILURE([grpc requested but grpc plugin for C++ not found.]) |
289 + | else |
290 + | GRPC_CPP_PLUGIN=`which grpc_cpp_plugin` |
291 + | fi ] ) |
292 + | GRPC_DO_BUILD=0 |
293 + | else |
294 + | GRPC_DO_BUILD=1 |
295 + | PROTOC="/usr/bin/false" |
296 + | GRPC_CPP_PLUGIN="/usr/bin/false" |
297 + | fi |
298 + | AC_SUBST(GRPC_CFLAGS) |
299 + | AC_SUBST(GRPC_LIBS) |
300 + | AC_SUBST(GRPC_DO_BUILD) |
301 + | AC_SUBST(PROTOC) |
302 + | |
301 303 | #AC_MSG_CHECKING([for casa version number]) |
302 304 | #read -a full_version <<< "`scripts/version | perl -pe 's|^(\d+).(\d+).*?$|$1 $2 0 0|'`" |
303 305 | #CASA_VERSION_MAJOR=${full_version[[0]]} |
304 306 | #CASA_VERSION_MINOR=${full_version[[1]]} |
305 307 | #CASA_VERSION_PATCH=${full_version[[2]]} |
306 308 | #CASA_VERSION_FEATURE=${full_version[[3]]} |
307 309 | #CASA_VERSION_DESC="CASAtools:v1.0.0" |
308 310 | #CASA_VERSION="${CASA_VERSION_MAJOR}.${CASA_VERSION_MINOR}.${CASA_VERSION_PATCH}-${CASA_VERSION_FEATURE}" |
309 311 | #CASA_VARIANT="none" |
310 312 | #AC_MSG_RESULT($CASA_VERSION) |