Changeset 1709

Show
Ignore:
Timestamp:
02/25/07 21:18:36 (23 months ago)
Author:
aturner
Message:

remove code detection for Lyx, etc.
make tcprewrite enabled by default
add HAVE_WINPCAP
refs #66, #75, #15, #110

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/configure.in

    r1699 r1709  
    4949AC_EXEEXT 
    5050AC_PATH_PROG(PRINTF, printf) 
    51 AC_PATH_PROG(FIG2DEV, fig2dev) 
    52  
    53 dnl Look for lyx in the normal locations 
    54 dnl The OS X installer puts Lyx at /Applications/Lyx.app/Contents/MacOS/LyX 
    55  
    56 AC_ARG_WITH(lyx, 
    57     AC_HELP_STRING([--with-lyx=FILE], [Path to Lyx binary]), 
    58     [ AC_MSG_CHECKING(for lyx) 
    59     if test -x $withval ; then 
    60           td=$withval 
    61           AC_MSG_RESULT($td) 
    62       else 
    63           AC_MSG_RESULT([Error: $withval does not exist or is not executable]) 
    64       fi ], 
    65     [  
    66     case $host in 
    67         powerpc-apple-darwin*) 
    68         lyx=/Applications/Lyx.app/Contents/MacOS/LyX 
    69         if test -x $lyx ; then 
    70             AC_MSG_CHECKING(for lyx) 
    71             AC_SUBST(LYX, $lyx) 
    72             AC_MSG_RESULT($lyx)  
    73         else 
    74             AC_PATH_PROG(LYX, lyx) 
    75         fi 
    76         ;; 
    77  
    78         *) 
    79         AC_PATH_PROG(LYX, lyx) 
    80         ;; 
    81         esac 
    82     ]) 
    83  
    84 AC_PATH_PROG(DVIPS, dvips) 
    85 AC_PATH_PROG(TEXI2DVI, texi2dvi) 
    86 AC_PATH_PROG(LATEX2HTML, latex2html) 
    87 AC_PATH_PROG(DVIPDFM, dvipdfm) 
    8851AC_PATH_PROG(AUTOGEN, autogen) 
    8952 
     
    12992 
    13093AC_C_BIGENDIAN 
    131  
    132 doctools=no 
    133 if test -n "$FIG2DEV" -a -n "$LYX" -a -n "$DVIPS" -a -n "$TEXI2DVI" \ 
    134          -a -n "$LATEX2HTML" -a -n "$DVIPDFM" ; then 
    135     doctools=yes 
    136 fi 
    137 AM_CONDITIONAL(HAVE_DOCTOOLS, test $doctools = yes) 
    13894 
    13995dnl Enable debugging in code/compiler options 
     
    278234AM_CONDITIONAL([ENABLE_FLOWREPLAY], [test x$flowreplay = xyes]) 
    279235 
    280 dnl Enable tcpbridge 
    281 tcpbridge=no 
    282 AC_ARG_ENABLE(tcpbridge, 
    283     AC_HELP_STRING([--enable-tcpbridge], [Enable building tcpbridge (beta)]), 
    284     [ if test x$enableval = xyes; then 
    285          tcpbridge=yes 
    286          AC_DEFINE([ENABLE_TCPBRIDGE], [1], [Enable building tcpbridge (beta)])  
    287       fi]) 
    288  
    289 AM_CONDITIONAL([ENABLE_TCPBRIDGE], [test x$tcpbridge = xyes]) 
    290  
    291  
    292236dnl ################################################## 
    293237dnl Checks for libnet (shamelessly horked from dsniff) 
     
    417361    [trypcapdir=$withval]) 
    418362 
    419     for testdir in $trypcapdir /usr/local /usr ; do  
    420      if test -f "${testdir}/include/pcap.h" -a $foundpcap = no ; then 
    421          LPCAPINC="${testdir}/include/pcap.h" 
    422          LPCAPINCDIR="${testdir}/include" 
    423          if test $dynamic_link = yes; then 
    424              LPCAPLIB="-L${testdir}/lib -lpcap" 
    425          elif test -f "${testdir}/lib64/libpcap.a" ; then 
    426              LPCAPLIB="${testdir}/lib64/libpcap.a" 
    427          elif test -f "${testdir}/lib/libpcap.a" ; then 
    428              LPCAPLIB="${testdir}/lib/libpcap.a" 
    429          else 
    430              LPCAPLIB="${testdir}/lib/libwpcap.a" 
    431          fi  
    432         foundpcap=$testdir 
    433      fi 
    434    done 
    435  
    436    if test $foundpcap = no ; then 
    437      AC_MSG_RESULT(no) 
    438      AC_ERROR(libpcap not found) 
    439    else 
    440      AC_MSG_RESULT($foundpcap) 
    441    fi 
     363        for testdir in $trypcapdir /usr/local /usr ; do  
     364        if test -f "${testdir}/include/pcap.h" -a $foundpcap = no ; then 
     365                LPCAPINC="${testdir}/include/pcap.h" 
     366                LPCAPINCDIR="${testdir}/include" 
     367                if test $dynamic_link = yes; then 
     368                    LPCAPLIB="-L${testdir}/lib -lpcap" 
     369                elif test -f "${testdir}/lib64/libpcap.a" ; then 
     370                    LPCAPLIB="${testdir}/lib64/libpcap.a" 
     371                elif test -f "${testdir}/lib/libpcap.a" ; then 
     372                    LPCAPLIB="${testdir}/lib/libpcap.a" 
     373                elif test -f "${testdir}/lib/libwpcap.a" 
     374                    LPCAPLIB="${testdir}/lib/libwpcap.a" 
     375                                AC_DEFINE([HAVE_WINPCAP], [1], [Do we have WinPcap?]) 
     376                        else 
     377                                AC_ERROR(Unable to find matching library for header file in ${testdir}) 
     378                        fi 
     379                foundpcap=$testdir 
     380        fi 
     381        done 
     382 
     383        if test $foundpcap = no ; then 
     384                AC_MSG_RESULT(no) 
     385                AC_ERROR(libpcap not found) 
     386        else 
     387                AC_MSG_RESULT($foundpcap) 
     388        fi 
    442389 
    443390AC_SUBST(LPCAPINC) 
     
    963910           scripts/Makefile 
    964911           tcpreplay.spec]) 
    965  
    966 if test $doctools = no; then 
    967     AC_MSG_NOTICE([One or more tool for creating documentation is unavailable.]) 
    968     AC_MSG_NOTICE([This is only an issue for developers, so don't worry.]) 
    969 fi 
    970  
  • trunk/src/Makefile.am

    r1704 r1709  
    3333        @AUTOGEN@ -T agman1.tpl $(opts_list) --base-name tcpbridge tcpbridge_opts.def 
    3434 
    35 man_MANS = tcpreplay.1 tcpprep.1 tcprewrite.1 
     35man_MANS = tcpreplay.1 tcpprep.1 tcprewrite.1 tcpbridge.1 
    3636EXTRA_DIST = tcpreplay.1 tcpprep.1 tcprewrite.1 tcpbridge.1 flowreplay.1 
    37 bin_PROGRAMS = tcpreplay tcpprep tcprewrite 
     37bin_PROGRAMS = tcpreplay tcpprep tcprewrite tcpbridge 
    3838 
    3939if ENABLE_FLOWREPLAY 
    4040man_MANS += flowreplay.1 
    4141bin_PROGRAMS += flowreplay 
    42 endif 
    43  
    44 if ENABLE_TCPBRIDGE 
    45 man_MANS += tcpbridge.1 
    46 bin_PROGRAMS += tcpbridge 
    4742endif 
    4843 
  • trunk/src/config.h.in

    r1698 r1709  
    1515/* Enable building flowreplay (alpha) */ 
    1616#undef ENABLE_FLOWREPLAY 
    17  
    18 /* Enable building tcpbridge (beta) */ 
    19 #undef ENABLE_TCPBRIDGE 
    2017 
    2118/* fopen(3) accepts a 'b' in the mode flag */ 
     
    319316/* Define to 1 if you have the `vsnprintf' function. */ 
    320317#undef HAVE_VSNPRINTF 
     318 
     319/* Do we have WinPcap? */ 
     320#undef HAVE_WINPCAP 
    321321 
    322322/* What is the path (if any) to the pcap-bpf.h header? */