[libvirt] Fw:[PATCH] fix configure for pcap

Daniel P. Berrange berrange at redhat.com
Mon Nov 23 16:15:05 UTC 2015


On Mon, Nov 23, 2015 at 03:58:25PM +0800, 程宝传 wrote:
> when cross-compiling, pcap can not point to the correct toolchain.
> 
>  configure.ac | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index f481c50..d6d2cf4 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1555,7 +1555,7 @@ if test "$with_numad" != "no" ; then
>        with_numad="yes"
>      fi
>    else
> -    test -z  "$NUMAD" &&
> +    test -z  "$NUMAD" &&/
>        AC_MSG_ERROR([You must install numad package to manage CPU and memory placement dynamically])
> 
>      test "$with_numactl" = "yes" || fail=1
> @@ -1588,8 +1588,13 @@ if test "$with_qemu" = "yes"; then
>      if ! $LIBPCAP_CONFIG --libs > /dev/null 2>&1 ; then
>        AC_MSG_RESULT(no)
>      else
> -      LIBPCAP_LIBS="`$LIBPCAP_CONFIG --libs`"
> -      LIBPCAP_CFLAGS="`$LIBPCAP_CONFIG --cflags`"
> +   if test -n $with_libtool_sysroot && test -n $lt_sysroot; then
> +     LIBPCAP_LIBS="-lpcap"
> +     LIBPCAP_CFLAGS="-I$lt_sysroot/usr/include"
> +      else
> +     LIBPCAP_LIBS="`$LIBPCAP_CONFIG --libs`"
> +        LIBPCAP_CFLAGS="`$LIBPCAP_CONFIG --cflags`"
> +   fi
>        LIBPCAP_FOUND="yes"
>        AC_MSG_RESULT(yes)
>      fi

This doesn't really look very right. If you are cross compiling you
need $PATH to include your sysroot, so that you find the libpcap-config
program for your sysroot, instead of the native arch.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list