提交 0b9ab2ab 编写于 作者: D Diego Elio Pettenò 提交者: Eric Blake

build: properly handle ./configure --with-libpcap

Without this fix, ./configure --with-libpcap will cause --with-libpcap=yes
to be implicitly passed down, which cause yes/bin/pcap-config to be
searched for rather than /usr/bin/pcap-config.

Also output pcap: no when pcap is not found or disabled.
上级 5faf88fe
......@@ -1194,10 +1194,12 @@ LIBPCAP_FOUND="no"
AC_ARG_WITH([libpcap], AC_HELP_STRING([--with-libpcap=@<:@PFX@:>@], [libpcap location]))
if test "$with_qemu" = "yes"; then
if test "x$with_libpcap" != "xno" ; then
if test "x$with_libpcap" != "x" ; then
LIBPCAP_CONFIG=$with_libpcap/bin/$LIBPCAP_CONFIG
fi
AS_CASE(["x$with_libpcap"],
[xno], [LIBPCAP_CONFIG=""],
[x|xyes], [LIBPCAP_CONFIG="pcap-config"],
[LIBPCAP_CONFIG="$with_libpcap/bin/pcap-config"]
)
AS_IF([test "x$LIBPCAP_CONFIG" != "x"], [
AC_MSG_CHECKING(libpcap $LIBPCAP_CONFIG >= $LIBPCAP_REQUIRED )
if ! $LIBPCAP_CONFIG --libs > /dev/null 2>&1 ; then
AC_MSG_RESULT(no)
......@@ -1207,7 +1209,7 @@ if test "$with_qemu" = "yes"; then
LIBPCAP_FOUND="yes"
AC_MSG_RESULT(yes)
fi
fi
])
fi
if test "x$LIBPCAP_FOUND" = "xyes"; then
......@@ -2406,7 +2408,7 @@ AC_MSG_NOTICE([ xmlrpc: $XMLRPC_CFLAGS $XMLRPC_LIBS])
else
AC_MSG_NOTICE([ xmlrpc: no])
fi
if test "$with_qemu" = "yes" ; then
if test "$with_qemu" = "yes" && test "$LIBPCAP_FOUND" != "no"; then
AC_MSG_NOTICE([ pcap: $LIBPCAP_CFLAGS $LIBPCAP_LIBS])
else
AC_MSG_NOTICE([ pcap: no])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册