Changeset 1712

Show
Ignore:
Timestamp:
02/26/07 10:00:58 (23 months ago)
Author:
aturner
Message:

add detection support for pcap_version[] and fix a rather serious bug
with WinPcap? detection created in r1709. refs #111, #110

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/configure.in

    r1709 r1712  
    371371                elif test -f "${testdir}/lib/libpcap.a" ; then 
    372372                    LPCAPLIB="${testdir}/lib/libpcap.a" 
    373                 elif test -f "${testdir}/lib/libwpcap.a" 
     373                elif test -f "${testdir}/lib/libwpcap.a" ; then 
    374374                    LPCAPLIB="${testdir}/lib/libwpcap.a" 
    375375                                AC_DEFINE([HAVE_WINPCAP], [1], [Do we have WinPcap?]) 
    376376                        else 
    377                                 AC_ERROR(Unable to find matching library for header file in ${testdir}) 
     377                                AC_ERROR([Unable to find matching library for header file in ${testdir}]) 
    378378                        fi 
    379379                foundpcap=$testdir 
     
    519519                AC_MSG_RESULT(no) 
    520520        fi 
     521],[ 
     522        AC_MSG_RESULT(no) 
     523]) 
     524 
     525have_pcap_version=no 
     526dnl Check to see if we have pcap_version[] 
     527AC_MSG_CHECKING(for pcap_version[]) 
     528AC_TRY_COMPILE([ 
     529#include <stdio.h> 
     530#include <stdlib.h> 
     531#include <string.h> 
     532#include "$LPCAPINC" 
     533extern char pcap_version[]; 
     534],[ 
     535        printf("%s", pcap_version); 
     536],[ 
     537        AC_DEFINE([HAVE_PCAP_VERSION],[1], [Does libpcap have pcap_version[]]) 
     538        AC_MSG_RESULT(yes) 
    521539],[ 
    522540        AC_MSG_RESULT(no)