Changeset d48008d for configure.in


Ignore:
Timestamp:
05/16/10 21:34:48 (10 years ago)
Author:
Perry Lorier <perry@…>
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:
c3f597e
Parents:
9da93dc
Message:

Add JITting of BPF bytecode using LLVM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    rf1ab057 rd48008d  
    5555if test "$GCC" = "yes"; then
    5656        CFLAGS="$CFLAGS -Wall -Wextra -Wmissing-prototypes -O2"
     57        CXXFLAGS="$CXXFLAGS -Wall -Wextra -O2"
    5758# We assume that gcc knows about -fvisibility and friends, as I can't see
    5859# a good easy way of testing for it here.
     
    6061        LIBCFLAGS="$LIBCFLAGS -DLT_BUILDING_DLL=1"
    6162        LIBCFLAGS="$LIBCFLAGS -fvisibility=hidden"
     63        LIBCXXFLAGS="$CXXFLAGS"
     64        LIBCXXFLAGS="$CXXFLAGS -DLT_BUILDING_DLL=1"
     65        LIBCXXFLAGS="$CXXFLAGS -fvisibility=hidden"
    6266fi
    6367
     
    277281AC_SEARCH_LIBS(mvprintw, ncurses, [], [ AC_MSG_ERROR([NCurses library not available]) ])
    278282
     283AC_ARG_WITH([llvm],
     284        [AC_HELP_STRING([--with-llvm],
     285                [support Just In Time compiler])],
     286        use_llvm="yes",
     287        use_llvm="check")
     288
     289AC_PATH_PROG(llvm_config, llvm-config)
     290
     291if (test "$use_llvm" != "no"); then
     292        AC_PATH_PROG(LLVM_CONFIG, llvm-config, no)
     293        if test "$LLVM_CONFIG" = "no" ; then
     294                AC_MSG_NOTICE([Unable to find llvm-config.  JIT support disabled.])
     295                JIT=no
     296        else
     297                LIBCXXFLAGS="`$LLVM_CONFIG --cxxflags` $CXXFLAGS"
     298                ADD_LIBS="$ADD_LIBS `$LLVM_CONFIG --libs all`";
     299                LDFLAGS="`$LLVM_CONFIG --ldflags` $LDFLAGS";
     300                JIT=yes
     301                AC_DEFINE(HAVE_LLVM, 1, [Set to 1 if you have LLVM installed])
     302        fi
     303fi
     304
     305
    279306AM_CONDITIONAL([HAVE_BPF_CAPTURE], [test "$ac_cv_have_decl_BIOCSETIF" = yes ])
    280307AM_CONDITIONAL([HAVE_DAG], [test "$libtrace_dag" = true])
     
    287314AM_CONDITIONAL([HAVE_NETPACKET_PACKET_H], [test "$libtrace_netpacket_packet_h" = true])
    288315AM_CONDITIONAL([HAVE_LIBGDC], [test "$ac_cv_header_gdc_h" = yes])
     316AM_CONDITIONAL([HAVE_LLVM], [test "x$LLVM_CONFIG" != "xno" ])
    289317
    290318# Check for miscellaneous programs
     
    305333AC_SUBST([HAVE_BPF_CAPTURE])
    306334AC_SUBST([HAVE_LIBGDC])
     335AC_SUBST([HAVE_LLVM])
    307336AC_SUBST([LIBCFLAGS])
     337AC_SUBST([LIBCXXFLAGS])
    308338dnl and finally, output our Makefiles
    309339AC_OUTPUT
     
    334364        AC_MSG_NOTICE([Compiled with DAG live capture support: No])
    335365fi
     366reportopt "Compiled with LLVM BPF JIT support" $JIT
    336367reportopt "Building man pages/documentation" $libtrace_doxygen
    337368
Note: See TracChangeset for help on using the changeset viewer.