Mercurial > octave-nkf
comparison configure.ac @ 17878:0d660785098e
work around GCC bug in stl_algo.h (nth_element and sort; bug #40436)
* build-aux/stl_algo.h-fixed: New file.
* acinclude.m4 (OCTAVE_CHECK_BROKEN_STL_ALGO_H): New macro.
* configure.ac: Use it. Set AMCOND_HAVE_BROKEN_STL_ALGO_H.
* Makefile.am (bits/stl_algo.h): New target.
(BUILT_SOURCES): Add bits/stl_algo.h to the list if
AMCOND_HAVE_BROKEN_STL_ALGO_H is true.
(EXTRA_DIST): Include built-aux/stl_algo.h-fixed in the list.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 07 Nov 2013 14:03:58 -0500 |
parents | 540d1c122b08 |
children | 11a6c7445a71 |
comparison
equal
deleted
inserted
replaced
17877:540d1c122b08 | 17878:0d660785098e |
---|---|
340 | 340 |
341 ### Check version number when using gcc. | 341 ### Check version number when using gcc. |
342 | 342 |
343 GCC_VERSION= | 343 GCC_VERSION= |
344 if test "$GCC" = yes; then | 344 if test "$GCC" = yes; then |
345 AC_MSG_CHECKING([C compiler version number]) | |
345 gcc_version=`$CC -v 2>&1 | $GREP "^.*gcc version" | \ | 346 gcc_version=`$CC -v 2>&1 | $GREP "^.*gcc version" | \ |
346 $SED -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'` | 347 $SED -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'` |
347 | 348 |
348 AX_COMPARE_VERSION([$gcc_version], [lt], [3], | 349 AX_COMPARE_VERSION([$gcc_version], [lt], [3], |
349 [warn_gcc_version="gcc version $gcc_version is likely to cause problems" | 350 [warn_gcc_version="gcc version $gcc_version is likely to cause problems" |
350 OCTAVE_CONFIGURE_WARNING([warn_gcc_version])]) | 351 OCTAVE_CONFIGURE_WARNING([warn_gcc_version])]) |
351 | 352 |
352 GCC_VERSION=$gcc_version | 353 GCC_VERSION=$gcc_version |
354 AC_MSG_RESULT([$GCC_VERSION]) | |
353 fi | 355 fi |
354 AC_SUBST(GCC_VERSION) | 356 AC_SUBST(GCC_VERSION) |
355 | 357 |
356 ## FIXME: CC_VERSION is deprecated and should be removed in Octave version 3.12 | 358 ## FIXME: CC_VERSION is deprecated and should be removed in Octave version 3.12 |
357 CC_VERSION=$GCC_VERSION | 359 CC_VERSION=$GCC_VERSION |
360 ### Also check g++ version number, it might be different from the | 362 ### Also check g++ version number, it might be different from the |
361 ## gcc version number. | 363 ## gcc version number. |
362 | 364 |
363 GXX_VERSION= | 365 GXX_VERSION= |
364 if test "$GXX" = yes; then | 366 if test "$GXX" = yes; then |
365 gxx_version=`$CXX -v 2>&1 | $GREP "^.*g++ version" | \ | 367 AC_MSG_CHECKING([C++ compiler version number]) |
368 gxx_version=`$CXX -v 2>&1 | $GREP "^.*g.. version" | \ | |
366 $SED -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'` | 369 $SED -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'` |
367 | 370 |
368 AX_COMPARE_VERSION([$gxx_version], [lt], [3], | 371 AX_COMPARE_VERSION([$gxx_version], [lt], [3], |
369 [warn_gxx_version="g++ version $gxx_version is likely to cause problems" | 372 [warn_gxx_version="g++ version $gxx_version is likely to cause problems" |
370 OCTAVE_CONFIGURE_WARNING([warn_gxx_version])]) | 373 OCTAVE_CONFIGURE_WARNING([warn_gxx_version])]) |
371 | 374 |
372 GXX_VERSION=$gxx_version | 375 GXX_VERSION=$gxx_version |
376 AC_MSG_RESULT([$GXX_VERSION]) | |
373 fi | 377 fi |
374 AC_SUBST(GXX_VERSION) | 378 AC_SUBST(GXX_VERSION) |
379 | |
380 OCTAVE_CHECK_BROKEN_STL_ALGO_H | |
381 AM_CONDITIONAL([AMCOND_HAVE_BROKEN_STL_ALGO_H], | |
382 [test $octave_cv_broken_stl_algo_h = yes]) | |
375 | 383 |
376 ### Determine the compiler flag necessary to create dependencies | 384 ### Determine the compiler flag necessary to create dependencies |
377 | 385 |
378 ## Assume GCC. | 386 ## Assume GCC. |
379 INCLUDE_DEPS=yes | 387 INCLUDE_DEPS=yes |