Changeset 468


Ignore:
Timestamp:
11/02/05 11:53:44 (8 years ago)
Author:
dlawson
Message:

added --disable-libpacketdump and --disable-tools configure options.

tools/tracedump will only get built if libpacketdump is also being built
libpacketdump will fail to build (and generate an error) if there is no c++ compiler installed.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r465 r468  
    1 SUBDIRS=lib docs libpacketdump tools 
     1if LIBPACKETDUMP 
     2LIBPACKETDUMP_DIR = libpacketdump 
     3endif 
     4if LIBTRACE_TOOLS 
     5TOOLS_DIR = tools 
     6endif 
     7SUBDIRS = lib docs $(LIBPACKETDUMP_DIR) $(TOOLS_DIR) 
    28 
    39AUTOMAKE_OPTIONS = 1.5 
  • trunk/configure.in

    r467 r468  
    145145             fi 
    146146) 
     147 
     148# configure time option for building libpacketdump 
     149# libpacketdump needs a C++ compiler to build, so we should do some tests 
     150# at this point to see if one is installed 
     151libtrace_libpacketdump=true 
     152AC_ARG_ENABLE(libpacketdump, 
     153              AC_HELP_STRING([--disable-libpacketdump], 
     154                             [disable building of libpacketdump (enabled by default). libpacketdump needs a c++ compiler to build] ), 
     155[ 
     156        if test "$enableval" = no -o "$enableval" = false 
     157        then 
     158                libtrace_libpacketdump=false 
     159        else 
     160                libtrace_libpacketdump=true 
     161        fi 
     162], 
     163[ 
     164        libtrace_libpacketdump=true 
     165]) 
     166 
     167if test "$libtrace_libpacketdump" = true; then 
     168        AC_LANG_PUSH(C++) 
     169        AC_MSG_CHECKING([if we can compile C++ ]) 
     170        AC_COMPILE_IFELSE([AC_LANG_PROGRAM( 
     171                           [[ 
     172#include <iostream> 
     173                           ]])], 
     174                [AC_DEFINE(HAVE_CXX,1,[define to test for presence of a working C++ compiler]) libtrace_cxx=true], 
     175                [AC_DEFINE(HAVE_CXX,0,[define to test for presence of a working C++ compiler]) libtrace_cxx=false]) 
     176 
     177        AC_MSG_RESULT($libtrace_cxx)     
     178        AC_LANG_POP(C++) 
     179 
     180        if test "$libtrace_cxx" = false; then 
     181                AC_MSG_ERROR([libpacketdump requested, but no C++ compiler found. Build with --disable-libpacketdump if you wish to continue anyway ]) 
     182        fi 
     183fi 
     184 
     185# configure time option for building the libtrace tools 
     186# one of the tools requires libpacketdump, so won't build if libpacketdump 
     187# hasn't also been built 
     188libtrace_tools=true 
     189AC_ARG_ENABLE(tools, 
     190              AC_HELP_STRING([--disable-tools], 
     191                             [disable building of the tools contained in the tools/ directory]), 
     192[ 
     193        if test "$enableval" = no -o "$enableval" = false 
     194        then 
     195                libtrace_tools=false 
     196        else 
     197                libtrace_tools=true 
     198        fi 
     199         
     200], 
     201[ 
     202        libtrace_tools=true 
     203])  
    147204 
    148205# configure time options for use of DAG cards 
     
    223280fi 
    224281 
    225 AM_CONDITIONAL(HAVE_DAG, test x$libtrace_dag = xtrue) 
    226 AM_CONDITIONAL(DAG2_4, test x$libtrace_dag2_4 = xtrue) 
    227  
    228  
    229 # Check for miscellaneous programs 
    230 AC_CHECK_PROG([libtrace_doxygen], [doxygen], [true], [false]) 
    231  
    232 AM_CONDITIONAL(HAS_DOXYGEN, [test x"$libtrace_doxygen" = xtrue]) 
    233282 
    234283 
     
    277326fi 
    278327 
     328AM_CONDITIONAL([HAVE_DAG], [test "$libtrace_dag" = true]) 
     329AM_CONDITIONAL([DAG2_4], [test "$libtrace_dag2_4" = true]) 
     330AM_CONDITIONAL([HAVE_CXX], [test "$libtrace_cxx" = true]) 
     331AM_CONDITIONAL([LIBPACKETDUMP], [test "$libtrace_libpacketdump" = true]) 
     332AM_CONDITIONAL([LIBTRACE_TOOLS], [test "$libtrace_tools" = true]) 
     333 
     334# Check for miscellaneous programs 
     335AC_CHECK_PROG([libtrace_doxygen], [doxygen], [true], [false]) 
     336 
     337AM_CONDITIONAL(HAS_DOXYGEN, [test x"$libtrace_doxygen" = xtrue]) 
    279338 
    280339 
     
    284343AC_SUBST([LTLIBOBJS]) 
    285344AC_SUBST([MANPAGES]) 
    286 AC_SUBST([LIBTRACE_VERSION]) 
    287 AC_SUBST(LIBTRACE_LT_VERSION) 
    288345 
    289346dnl and finally, output our Makefiles 
     
    304361reportopt "Compiled with DAG support (DAG 2.4)" $libtrace_dag2_4 
    305362reportopt "Building man pages/documentation" $libtrace_doxygen 
    306  
     363reportopt "Building libpacketdump" $libtrace_libpacketdump 
     364reportopt "Building tools/ directory" $libtrace_tools 
     365 
  • trunk/libpacketdump/Makefile.am

    r465 r468  
    11lib_LTLIBRARIES = libpacketdump.la 
    22include_HEADERS = libpacketdump.h  
    3  
    4 #LINK_LAYERS=$(addsuffix .so,$(basename $(wildcard link_*.cc))) 
    5 #ETH_LAYERS=$(addsuffix .so,$(basename $(wildcard eth_*.cc))) 
    6 #IP_LAYERS=$(addsuffix .so,$(basename $(wildcard ip_*.cc))) 
    7 #TCP_LAYERS=$(addsuffix .so,$(basename $(wildcard tcp_*.cc))) 
    83 
    94LINK_LAYERS=$(wildcard link_*.cc) 
     
    3732install-exec-local: 
    3833        for plugin in $(PLUGINS); do install -D -m 755 $$plugin $(PLUGINDIR)/$$plugin; done 
     34 
     35uninstall-exec-local: 
     36        for plugin in $(PLUGINS); do rm -f $(PLUGINDIR)/$$plugin; done 
  • trunk/tools/Makefile.am

    r465 r468  
    1 SUBDIRS=traceanon tracedump tracemerge tracertstats tracesplit 
     1if LIBPACKETDUMP 
     2TRACEDUMP_DIR=tracedump 
     3endif 
     4 
     5if LIBTRACE_TOOLS 
     6SUBDIRS=traceanon tracemerge tracertstats tracesplit $(TRACEDUMP_DIR) 
     7else 
     8SUBDIRS= 
     9endif 
    210 
    311all-hook: 
Note: See TracChangeset for help on using the changeset viewer.