Mercurial > octave-nkf
comparison configure.ac @ 15229:e5a86de6023c
configure.ac: Improve LLVM configure check and warning (bug #37050)
author | Max Brister <max@2bass.com> |
---|---|
date | Sat, 25 Aug 2012 13:11:34 -0500 |
parents | 017f0b2e6933 |
children | d65ef0fc5e05 |
comparison
equal
deleted
inserted
replaced
15227:fbecbce45898 | 15229:e5a86de6023c |
---|---|
679 save_CPPFLAGS="$CPPFLAGS" | 679 save_CPPFLAGS="$CPPFLAGS" |
680 save_CXXFLAGS="$CXXFLAGS" | 680 save_CXXFLAGS="$CXXFLAGS" |
681 save_LIBS="$LIBS" | 681 save_LIBS="$LIBS" |
682 save_LDFLAGS="$LDFLAGS" | 682 save_LDFLAGS="$LDFLAGS" |
683 | 683 |
684 warn_llvm="LLVM library fails tests. JIT compilation will be disabled." | |
685 | |
686 AC_ARG_VAR(LLVM_CONFIG, [path to llvm-config utility]) | 684 AC_ARG_VAR(LLVM_CONFIG, [path to llvm-config utility]) |
687 | 685 |
688 AC_ARG_ENABLE([jit-debug], | 686 AC_ARG_ENABLE([jit-debug], |
689 AS_HELP_STRING([--enable-jit-debug], [enable debug printing of JIT IRs])) | 687 AS_HELP_STRING([--enable-jit-debug], [enable debug printing of JIT IRs])) |
690 | 688 |
696 LLVM_CPPFLAGS= | 694 LLVM_CPPFLAGS= |
697 LLVM_LDFLAGS= | 695 LLVM_LDFLAGS= |
698 LLVM_LIBS= | 696 LLVM_LIBS= |
699 | 697 |
700 if test "x$ac_cv_env_LLVM_CONFIG_set" = "xset"; then | 698 if test "x$ac_cv_env_LLVM_CONFIG_set" = "xset"; then |
699 warn_llvm="LLVM was not found or is to old. JIT is disabled." | |
700 | |
701 ## We use -isystem if available because we do not want to see warnings in LLVM | 701 ## We use -isystem if available because we do not want to see warnings in LLVM |
702 LLVM_INCLUDE_FLAG=-I | 702 LLVM_INCLUDE_FLAG=-I |
703 OCTAVE_CC_FLAG(-isystem ., [ | 703 OCTAVE_CC_FLAG(-isystem ., [ |
704 LLVM_INCLUDE_FLAG=-isystem | 704 LLVM_INCLUDE_FLAG=-isystem |
705 AC_MSG_NOTICE([using -isystem for llvm headers])]) | 705 AC_MSG_NOTICE([using -isystem for llvm headers])]) |
719 CXXFLAGS="$LLVM_CXXFLAGS $CXXFLAGS" | 719 CXXFLAGS="$LLVM_CXXFLAGS $CXXFLAGS" |
720 LIBS="$LLVM_LIBS $LIBS" | 720 LIBS="$LLVM_LIBS $LIBS" |
721 LDFLAGS="$LLVM_LDFLAGS $LDFLAGS" | 721 LDFLAGS="$LLVM_LDFLAGS $LDFLAGS" |
722 | 722 |
723 AC_LANG_PUSH(C++) | 723 AC_LANG_PUSH(C++) |
724 AC_CHECK_HEADER([llvm/LLVMContext.h], [ | 724 AC_CHECK_HEADERS([llvm/LLVMContext.h, llvm/Support/TargetSelect.h], [ |
725 AC_MSG_CHECKING([for llvm::getGlobalContext in llvm/LLVMContext.h]) | 725 AC_MSG_CHECKING([for llvm::getGlobalContext in llvm/LLVMContext.h]) |
726 AC_COMPILE_IFELSE( | 726 AC_COMPILE_IFELSE( |
727 [AC_LANG_PROGRAM([[ | 727 [AC_LANG_PROGRAM([[ |
728 #include <llvm/LLVMContext.h> | 728 #include <llvm/LLVMContext.h> |
729 ]], [[ | 729 ]], [[ |
736 ]) | 736 ]) |
737 ]) | 737 ]) |
738 AC_LANG_POP(C++) | 738 AC_LANG_POP(C++) |
739 | 739 |
740 else | 740 else |
741 warn_llvm="LLVM_CONFIG not set. JIT compilation will be disabled." | 741 warn_llvm="LLVM_CONFIG not set. The experiential JIT feature is disabled." |
742 fi | 742 fi |
743 | 743 |
744 if test -z "$warn_llvm"; then | 744 if test -z "$warn_llvm"; then |
745 AC_DEFINE(HAVE_LLVM, 1, [Define to 1 if LLVM is available.]) | 745 AC_DEFINE(HAVE_LLVM, 1, [Define to 1 if LLVM is available.]) |
746 else | 746 else |