Changeset 52656ed for configure.in


Ignore:
Timestamp:
09/04/07 16:50:19 (13 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:
5798dc6
Parents:
2cf30f6
Message:
  • Updated autotools to detect DAG 3.X drivers. The new detection method will also catch DAG 2.5, but this is not a problem because the API is the same so DAG 2.5 and DAG 3 can use the same code within libtrace.
  • Changed format_dag25.c to manage the dag stream manually, similar to format_dag24.c.
  • Libtrace programs using DAG 2.5 and greater should now detach the DAG stream properly, provided they are exited cleanly.
  • The snaplen can now be configured for DAG 2.5 and DAG 3.0 inputs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    r994beed r52656ed  
    173173])
    174174
     175# DAG 3.0 actually puts header files and shared libraries into sensible
     176# places now, so we should be able to do a simple CHECK_LIB to see if
     177# they're there!
     178
     179# Addendum: It turns out DAG 2.5 does this too, so we'll match DAG2.5 in here
     180# also. This isn't such a bad thing, the DAG2.5 API is essentially the same as
     181# DAG 3.0 and libtrace will use the same format_dagXX source for both
     182libtrace_dag=false
     183libtrace_dag_version=none
     184
     185if test "$with_dag" != no; then
     186        AC_CHECK_LIB(dag, dag_open, dag_found=1, dag_found=0)
     187        if test "$dag_found" = 1; then
     188                ADD_LIBS="$ADD_LIBS -ldag"
     189                AC_DEFINE(HAVE_DAG_API, 1, [define if you have a DAG API])
     190                AC_DEFINE(HAVE_DAG,1,[conditional for building with DAG support])
     191                libtrace_dag=true
     192               
     193                AC_DEFINE(DAG_VERSION,30,[defines the DAG driver version])
     194                libtrace_dag_version=30
     195        fi
     196fi
     197
    175198# turn the test part of the next block into a function, so it can be
    176199# called multiple times for $dag_root, /root/dag, /usr/local/lib
    177 libtrace_dag=false
    178 libtrace_dag2_4=false
    179 dag_drv_v="DAG not present"
    180 if test "$with_dag" != no; then
    181         AC_MSG_CHECKING(whether we have DAG API)
     200#dag_drv_v="DAG not present"
     201
     202# Now check for 2.4 DAG drivers which don't install as cleanly!
     203if test "$with_dag" != no -a "$libtrace_dag" = false; then
     204        AC_MSG_CHECKING(whether we have DAG 2.4 API)
    182205
    183206        if test -r "$dag_root/lib"; then
     
    206229                AC_DEFINE(HAVE_DAG_API, 1, [define if you have a DAG API])
    207230                AC_DEFINE(HAVE_DAG,1,[conditional for building with DAG support])
     231                AC_DEFINE(DAG_VERSION, 24, [defines the DAG driver version])
     232                libtrace_dag_version=24
    208233        else
    209234                if test "$want_dag" = yes; then
     
    215240        AC_MSG_RESULT($libtrace_dag)
    216241
    217         if test "$libtrace_dag" != false; then
    218                 AC_MSG_CHECKING(if we are using DAG 2.4)
    219                 if grep '2.4.' $dag_root/VERSION > /dev/null 2>&1; then
    220                         libtrace_dag2_4=true
    221                         AC_DEFINE(DAG_VERSION_2_4, 1, [define if using DAG 2.4])
    222                 else
    223                         libtrace_dag2_4=false
    224                 fi
    225                 AC_MSG_RESULT($libtrace_dag2_4)
    226                 dag_drv_v=`cat $dag_root/VERSION`
    227         fi
    228 fi
    229 DAG_VERSION_NUM=$dag_drv_v
     242fi
     243
    230244AC_CHECK_LIB(z, gzopen)
    231245
    232246AM_CONDITIONAL([HAVE_BPF], [test "$ac_cv_have_decl_BIOCSETIF" = yes ])
    233247AM_CONDITIONAL([HAVE_DAG], [test "$libtrace_dag" = true])
    234 AM_CONDITIONAL([DAG2_4], [test "$libtrace_dag2_4" = true])
     248AM_CONDITIONAL([DAG2_4], [test "$libtrace_dag_version" = 24])
     249AM_CONDITIONAL([DAG2_5], [test "$libtrace_dag_version" = 25])
     250AM_CONDITIONAL([DAG3_0], [test "$libtrace_dag_version" = 30])
    235251AM_CONDITIONAL([HAVE_ZLIB], [test "$ac_cv_lib_z_gzopen" = yes])
    236252AM_CONDITIONAL([HAVE_NETPACKET_PACKET_H], [test "$libtrace_netpacket_packet_h" = true])
     
    269285reportopt "Compiled with compressed trace (zlib) support" $ac_cv_lib_z_gzopen
    270286if test x"$libtrace_dag" = xtrue; then
    271         if test x"$libtrace_dag2_4"; then
     287        if test "$libtrace_dag_version" = 24; then
    272288                AC_MSG_NOTICE([Compiled with DAG support: 2.4])
     289        elif test "$libtrace_dag_version" = 30; then
     290                AC_MSG_NOTICE([Compiled with DAG support: 3.0])
    273291        else
    274292                AC_MSG_NOTICE([Compiled with DAG support: 2.5])
    275         fi
     293        fi     
    276294else
    277295        AC_MSG_NOTICE([Compiled with DAG support: No])
Note: See TracChangeset for help on using the changeset viewer.