Changeset 7b29593 for configure.in


Ignore:
Timestamp:
07/29/10 14:50:46 (10 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
ddf1fc0
Parents:
bb47c98
Message:
  • Detection of LLVM is no longer automatic - the user explicitly has to ask for it.
  • Added rules to detect other necessary LLVM components, such as llvm-gcc and the boost libraries
  • Since we check for llvm-gcc explicitly, we can avoid the assumption that it is in the same dir as llvm-config (which it isn't in some installs)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    rdb32a56 r7b29593  
    300300AC_SEARCH_LIBS(mvprintw, ncurses, [], [ AC_MSG_ERROR([NCurses library not available]) ])
    301301
     302
     303# For now, the user has to explicitly ask for the LLVM stuff, as it's a bit
     304# rough around the edges :(
    302305AC_ARG_WITH([llvm],
    303306        [AC_HELP_STRING([--with-llvm],
    304307                [support Just In Time compiler])],
    305308        use_llvm="yes",
    306         use_llvm="check")
    307 
    308 AC_PATH_PROG(llvm_config, llvm-config)
     309        use_llvm="no")
     310JIT=no
    309311
    310312if (test "$use_llvm" != "no"); then
    311313        AC_PATH_PROG(LLVM_CONFIG, llvm-config, no)
    312         if test "$LLVM_CONFIG" = "no" ; then
     314
     315        # XXX Hard coding the path is REALLY bad.
     316        # llvm-gcc is installed in a stupid place in Debian / Ubuntu. Hard luck
     317        # if you've installed it somewhere custom.
     318        # Hopefully in future we can replace this with clang, which may or may
     319        # not be installed somewhere intelligent.
     320        AC_PATH_PROG(LLVM_GCC, llvm-gcc, no, /usr/lib/llvm/llvm/gcc-4.2/bin)
     321
     322        AC_LANG_PUSH([C++])
     323        AC_CHECK_HEADERS([boost/lexical_cast.hpp], boost="yes", boost="no")
     324        AC_LANG_POP([C++])
     325
     326               
     327        if test "$boost" = "no"; then
     328                AC_MSG_NOTICE([Unabled to find boost libraries.  JIT support disabled.])
     329                JIT=no
     330        elif test "$LLVM_CONFIG" = "no" ; then
    313331                AC_MSG_NOTICE([Unable to find llvm-config.  JIT support disabled.])
     332                JIT=no
     333        elif test "$LLVM_GCC" = "no"; then
     334                AC_MSG_NOTICE([Unable to find llvm-gcc.  JIT support disabled.])
    314335                JIT=no
    315336        else
     
    333354AM_CONDITIONAL([HAVE_NETPACKET_PACKET_H], [test "$libtrace_netpacket_packet_h" = true])
    334355AM_CONDITIONAL([HAVE_LIBGDC], [test "$ac_cv_header_gdc_h" = yes])
    335 AM_CONDITIONAL([HAVE_LLVM], [test "x$LLVM_CONFIG" != "xno" ])
     356AM_CONDITIONAL([HAVE_LLVM], [test "x$JIT" != "xno" ])
    336357
    337358# Check for miscellaneous programs
Note: See TracChangeset for help on using the changeset viewer.