Re: Fw:[PATCH] fix configure for pcap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]