Mercurial > hg > octave-nkf
changeset 15001:894cf2c07f92
Properly restore compiler and linker flags after llvm tests
* configure.ac: move save and restore of CPPFLAGS, CXXFLAGS, LIBS and LDFLAGS
author | Carlo de Falco <cdf@users.sourceforge.net> |
---|---|
date | Sun, 22 Jul 2012 03:58:02 +0200 |
parents | 0ef151f9fdc9 |
children | 3172d7916158 |
files | configure.ac |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -721,6 +721,11 @@ dnl llvm is odd and has its own pkg-config like script. We should probably check dnl for existance and dnl +save_CPPFLAGS="$CPPFLAGS" +save_CXXFLAGS="$CXXFLAGS" +save_LIBS="$LIBS" +save_LDFLAGS="$LDFLAGS" + warn_llvm="LLVM library fails tests. JIT compilation will be disabled." AC_ARG_VAR(LLVM_CONFIG, [path to llvm-config utility]) @@ -750,11 +755,6 @@ LLVM_CPPFLAGS="$LLVM_INCLUDE_FLAG `$LLVM_CONFIG --includedir`" LLVM_CXXFLAGS= - save_CPPFLAGS="$CPPFLAGS" - save_CXXFLAGS="$CXXFLAGS" - save_LIBS="$LIBS" - save_LDFLAGS="$LDFLAGS" - dnl dnl We define some extra flags that llvm requires in order to include headers. dnl Idealy we should get these from llvm-config, but llvm-config isn't very @@ -780,15 +780,11 @@ ]) ]) AC_LANG_POP(C++) + else warn_llvm="LLVM_CONFIG not set. JIT compilation will be disabled." fi -CPPFLAGS="$save_CPPFLAGS" -CXXFLAGS="$save_CXXFLAGS" -LIBS="$save_LIBS" -LDFLAGS="$save_LDFLAGS" - if test -z "$warn_llvm"; then AC_DEFINE(HAVE_LLVM, 1, [Define if LLVM is available]) else @@ -804,6 +800,11 @@ AC_SUBST(LLVM_LDFLAGS) AC_SUBST(LLVM_LIBS) +CPPFLAGS="$save_CPPFLAGS" +CXXFLAGS="$save_CXXFLAGS" +LIBS="$save_LIBS" +LDFLAGS="$save_LDFLAGS" + ### Check for HDF5 library. save_CPPFLAGS="$CPPFLAGS"