comparison configure.ac @ 15167:1c711a646fa7

Deprecate configure variables CC_VERSION, CXX_VERSION. Replaced with GCC_VERSION, GXX_VERSION. * NEWS: Announce deprecated variables CC_VERSION, CXX_VERSION. * common.mk: Add new substitutions for GCC_VERSION, GXX_VERSION * configure.ac: Add new substitutions for GCC_VERSION, GXX_VERSION * toplev.cc (Foctave_config_info): Add variables OCTAVE_CONF_GCC_VERSION, OCTAVE_CONF_GXX_VERSION to configure info report. * oct-conf.in.h: Add variables OCTAVE_CONF_GCC_VERSION, OCTAVE_CONF_GXX_VERSION to header file.
author Rik <rik@octave.org>
date Mon, 13 Aug 2012 14:04:26 -0700
parents 8750f2cdc4f1
children 66dcad99b55e
comparison
equal deleted inserted replaced
15166:8750f2cdc4f1 15167:1c711a646fa7
230 AC_PROG_CXX 230 AC_PROG_CXX
231 AC_PROG_CXXCPP 231 AC_PROG_CXXCPP
232 232
233 ### Check version number when using g++. 233 ### Check version number when using g++.
234 234
235 CXX_VERSION= 235 GXX_VERSION=
236 if test "$GXX" = yes; then 236 if test "$GXX" = yes; then
237 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ 237 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \
238 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'` 238 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'`
239 239
240 case "$gxx_version" in 240 case "$gxx_version" in
241 1.* | 2.[[0123456789]].* | 3.[[01234]].*) 241 1.* | 2.[[0123456789]].* | 3.[[01234]].*)
242 AC_MSG_ERROR([g++ version $gxx_version will probably fail to compile Octave]) 242 AC_MSG_ERROR([g++ version $gxx_version will probably fail to compile Octave])
243 ;; 243 ;;
244 esac 244 esac
245 CXX_VERSION="$gxx_version" 245 GXX_VERSION="$gxx_version"
246 fi 246 fi
247 AC_SUBST(GXX_VERSION)
248
249 ## FIXME: CXX_VERSION is deprecated and should be removed in version 3.12
250 CXX_VERSION="$gxx_version"
247 AC_SUBST(CXX_VERSION) 251 AC_SUBST(CXX_VERSION)
248 252
249 ### Determine which C compiler to use (we expect to find gcc). 253 ### Determine which C compiler to use (we expect to find gcc).
250 254
251 AC_PROG_CC 255 AC_PROG_CC
275 279
276 gl_EARLY 280 gl_EARLY
277 281
278 ### Check version number when using gcc. 282 ### Check version number when using gcc.
279 283
280 CC_VERSION= 284 GCC_VERSION=
281 if test "$GCC" = yes; then 285 if test "$GCC" = yes; then
282 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \ 286 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \
283 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` 287 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'`
284 case "$gcc_version" in 288 case "$gcc_version" in
285 [12].*) 289 [12].*)
286 warn_gcc_version="gcc version $gcc_version is likely to cause problems" 290 warn_gcc_version="gcc version $gcc_version is likely to cause problems"
287 OCTAVE_CONFIGURE_WARNING([warn_gcc_version]) 291 OCTAVE_CONFIGURE_WARNING([warn_gcc_version])
288 ;; 292 ;;
289 esac 293 esac
290 CC_VERSION="$gcc_version" 294 GCC_VERSION="$gcc_version"
291 fi 295 fi
292 AC_SUBST(CC_VERSION) 296 AC_SUBST(CC_VERSION)
297
298 ## FIXME: CC_VERSION is deprecated and should be removed in version 3.12
299 CC_VERSION="$gcc_version"
300 AC_SUBST(GCC_VERSION)
293 301
294 ### Determine the compiler flag necessary to create dependencies 302 ### Determine the compiler flag necessary to create dependencies
295 303
296 ## Assume GCC. 304 ## Assume GCC.
297 INCLUDE_DEPS=true 305 INCLUDE_DEPS=true