Changeset 437d002 for configure.in


Ignore:
Timestamp:
10/26/05 15:46:56 (15 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
6f75b9d
Parents:
e1f8084
Message:

updated configure.in to generare nice messages telling us what we configured libtrace with

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    r5fb1d5d r437d002  
    6464  AC_MSG_RESULT([No BPF headers, compiling without support for BPF filters])
    6565  AC_DEFINE(HAVE_BPF,0,[Conditional for building bpf support])
     66  libtrace_bpf=false
    6667else
    6768  AC_MSG_RESULT([Using $bpfh])
    6869  AC_DEFINE(HAVE_BPF,1,[Conditional for building bpf support])
     70  libtrace_bpf=true
    6971fi
    7072
     
    7880
    7981# Check to see if we have libpcap
    80 AC_CHECK_LIB(pcap,pcap_open_live,
    81              have_pcap_open_live=true,
    82              have_pcap_open_live=false)
    83 
    84 if test "$have_pcap_open_live" = true; then
     82AC_CHECK_LIB(pcap,libtrace_pcap,
     83             libtrace_pcap=true,
     84             libtrace_pcap=false)
     85
     86if test "$libtrace_pcap" = true; then
    8587    AC_DEFINE(HAVE_PCAP,1,[Conditional for building PCAP support])
    8688    ADD_LIBS="$ADD_LIBS  -lpcap"
     
    160162# turn the test part of the next block into a function, so it can be
    161163# called multiple times for $dag_root, /root/dag, /usr/local/lib
    162 ac_cv_lbl_dag_api=no
    163 dag2_4=false
     164libtrace_dag=false
     165libtrace_dag2_4=false
    164166if test "$with_dag" != no; then
    165167        AC_MSG_CHECKING(whether we have DAG API)
     
    186188                DAG_TOOLS_DIR=$dag_tools_dir
    187189                AC_SUBST([DAG_TOOLS_DIR])
    188                 ac_cv_lbl_dag_api=yes
     190                libtrace_dag=true
    189191               
    190192                AC_DEFINE(HAVE_DAG_API, 1, [define if you have a DAG API])
     
    195197; use --without-dag)
    196198                fi
    197                 ac_cv_lbl_dag_api=no
     199                libtrace_dag=false
    198200        fi
    199         AC_MSG_RESULT($ac_cv_lbl_dag_api)
     201        AC_MSG_RESULT($libtrace_dag)
    200202       
    201203        AC_MSG_CHECKING(if we are using DAG 2.4)
    202204        if grep '2.4.' $dag_root/VERSION > /dev/null 2>&1; then
    203                 dag2_4=yes
     205                libtrace_dag2_4=true
    204206        else
    205                 dag2_4=no
     207                libtrace_dag2_4=false
    206208        fi
    207         AC_MSG_RESULT($dag2_4)
     209        AC_MSG_RESULT($libtrace_dag2_4)
    208210else
    209211        AC_DEFINE(HAVE_DAG,0,[conditional for building with DAG support])
    210212fi
    211213
    212 AM_CONDITIONAL(HAVE_DAG, test x$ac_cv_lbl_dag_api = xyes)
    213 AM_CONDITIONAL(DAG2_4, test x$dag2_4 = xyes)
     214AM_CONDITIONAL(HAVE_DAG, test x$libtrace_dag = xtrue)
     215AM_CONDITIONAL(DAG2_4, test x$libtrace_dag2_4 = xtrue)
    214216
    215217
    216218# Check for miscellaneous programs
    217 AC_CHECK_PROG([has_doxygen], [doxygen], [true], [false])
    218 
    219 AM_CONDITIONAL(HAS_DOXYGEN, [test x"$has_doxygen" = xtrue])
    220 
    221 
    222 
    223 # The following is commented out because it seems you don't actually
    224 # need it. libpcap 'just works' with large files, even under woody,
    225 # although you probably need _FILE_OFFSET_BITS and LARGEFILE etc set
    226 # properly - libtrace handles this however.
    227 ## configure time options for selecting which libpcap and libz to use
    228 ## this is provided to allow for systems whose default libraries don't support
    229 ## large files - you can build your own and link using these options
    230 #AC_ARG_WITH([pcap],
    231 #    AC_HELP_STRING([--with-pcap],
    232 #                                  [name of pcap library (default is pcap)]),
    233 #       [ac_cv_use_pcap=$withval],
    234 #    [ac_cv_use_pcap=pcap])
    235 #
    236 #
    237 #AC_ARG_WITH([pcap-path],
    238 #    AC_HELP_STRING([--with-pcap-path],
    239 #                                  [location of pcap library (default is /usr/lib)]),
    240 #       [ac_cv_use_pcap_path=$withval],
    241 #    [ac_cv_use_pcap_path=/usr/lib])
    242 #
    243 #if test x"$ac_cv_use_pcap" != xno; then
    244 #    ADD_LIBS="$ADD_LIBS  -l$ac_cv_use_pcap"
    245 #   
    246 #    pcap_lib_file="${ac_cv_use_pcap_path}/lib${ac_cv_use_pcap}.so"
    247 #   
    248 #    # if the library is in /usr/lib, then just use
    249 #    # AC_CHECK_LIB.
    250 #    if test x"${ac_cv_use_pcap_path}" == x"/usr/lib"; then
    251 #           AC_CHECK_LIB(${ac_cv_use_pcap},pcap_open_live,
    252 #                        have_libpcap=yes,
    253 #                        have_libpcap=no)
    254 #
    255 #           if test x"${have_libpcap}" == xno; then
    256 #               AC_MSG_NOTICE([Cannot find pcap library $pcap_lib_file.])
    257 #               AC_MSG_ERROR([Exiting]);
    258 #           fi
    259 #    else
    260 #       ADD_LDFLAGS="$ADD_LDFLAGS -L$ac_cv_use_pcap_path"
    261 #       # if it's not in /usr/lib/, check manually. This isn't nice,
    262 #       # and will probably break.
    263 #       if test ! -r "$ac_cv_use_pcap_path" -o ! -r "$pcap_lib_file"; then
    264 #               AC_MSG_NOTICE([Cannot find pcap library $pcap_lib_file.])
    265 #               AC_MSG_ERROR([Exiting]);
    266 #       fi 
    267 #    fi
    268 #    AC_DEFINE(HAVE_PCAP,1,[Conditional for building PCAP support])
    269 #else
    270 #    AC_DEFINE(HAVE_PCAP,0,[Conditional for building PCAP support])
    271 #fi
     219AC_CHECK_PROG([libtrace_doxygen], [doxygen], [true], [false])
     220
     221AM_CONDITIONAL(HAS_DOXYGEN, [test x"$libtrace_doxygen" = xtrue])
     222
     223
    272224
    273225
     
    308260    fi
    309261    AC_DEFINE(HAVE_ZLIB,1,[Conditional for building zlib support])
     262    libtrace_zlib=true
    310263else
    311264    AC_DEFINE(HAVE_ZLIB,0,[Conditional for building zlib support])   
     265    libtrace_zlib=false
    312266fi
    313267
     
    322276dnl and finally, output our Makefiles
    323277AC_OUTPUT
     278
     279function reportopt() {
     280        if test x"$2" = xtrue; then
     281                AC_MSG_NOTICE([$1: Yes])
     282        else
     283                AC_MSG_NOTICE([$1: No])
     284        fi
     285}
     286
     287reportopt "Compiled with BPF filter support" $libtrace_bpf
     288reportopt "Compiled with PCAP support" $libtrace_pcap
     289reportopt "Compiled with compressed trace (zlib) support" $libtrace_zlib
     290reportopt "Compiled with DAG support (libdag)" $libtrace_dag
     291reportopt "Compiled with DAG support (DAG 2.4)" $libtrace_dag2_4
     292reportopt "Building man pages/documentation" $libtrace_doxygen
     293
Note: See TracChangeset for help on using the changeset viewer.