Commits

Ville Suoranta authored 98196955a7a
Replace the rest of the which commands in configure.ac
No tags

casatools/configure.ac

Modified
174 174 temporary_script_dir=/tmp/casatools-config-$$
175 175 AC_MSG_NOTICE([ temporary directory $temporary_script_dir ])
176 176 current_directory=`pwd`
177 177 AC_MSG_NOTICE([creating $temporary_script_dir])
178 178 mkdir $temporary_script_dir
179 179 if [[ $? -ne 0 ]] ; then
180 180 AC_MSG_NOTICE([creation of temporary directory $temporary_script_dir failed])
181 181 exit 1
182 182 fi
183 183 cd $temporary_script_dir
184 -ln -s `which sed`
185 -ln -s `which rm`
186 -ln -s `which dirname`
187 -ln -s `which basename`
188 -ln -s `which grep`
189 -ln -s `which sort`
190 -ln -s `which printf`
191 -ln -s `which cat`
184 +ln -s `type -p sed`
185 +ln -s `type -p rm`
186 +ln -s `type -p dirname`
187 +ln -s `type -p basename`
188 +ln -s `type -p grep`
189 +ln -s `type -p sort`
190 +ln -s `type -p printf`
191 +ln -s `type -p cat`
192 192 cd $current_directory
193 193
194 194 PATH=$(dirname ${CXX}):/bin:$temporary_script_dir
195 195
196 196 if [[ "$host_osname" = "darwin" ]]; then
197 197 AC_PROG_CC([clang cc gcc gcc-mp-5])
198 198 else
199 199 AC_PROG_CC([gcc cc clang])
200 200 fi
201 201 AX_PATH_TO_BINARY(${CC},CC)
274 274 AX_RPFITS
275 275 AX_GSL(2.0)
276 276 AX_SWIG(3.0.0)
277 277
278 278 if [[ "${SYSTEM_GRPC}" == "1" ]]; then
279 279 PKG_CHECK_MODULES( [GRPC], [grpc >= 6.0.0 grpc++ >= 1.16.1 protobuf >= 3.6.1 ], [
280 280 AC_CHECK_PROGS([PROTOC], [protoc], [/usr/bin/false])
281 281 if test "$PROTOC" = "/usr/bin/false"; then
282 282 AC_MSG_FAILURE([grpc requested but protoc not found.])
283 283 else
284 - PROTOC=`which protoc`
284 + PROTOC=`type -p protoc`
285 285 fi
286 286 AC_CHECK_PROGS([GRPC_CPP_PLUGIN], [grpc_cpp_plugin], [/usr/bin/false])
287 287 if test "$GRPC_CPP_PLUGIN" = "/usr/bin/false"; then
288 288 AC_MSG_FAILURE([grpc requested but grpc plugin for C++ not found.])
289 289 else
290 - GRPC_CPP_PLUGIN=`which grpc_cpp_plugin`
290 + GRPC_CPP_PLUGIN=`type -p grpc_cpp_plugin`
291 291 fi ] )
292 292 GRPC_DO_BUILD=0
293 293 else
294 294 GRPC_DO_BUILD=1
295 295 PROTOC="/usr/bin/false"
296 296 GRPC_CPP_PLUGIN="/usr/bin/false"
297 297 fi
298 298 AC_SUBST(GRPC_CFLAGS)
299 299 AC_SUBST(GRPC_LIBS)
300 300 AC_SUBST(GRPC_DO_BUILD)

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut