tcpdump, libpcap: simplify and fix ac_cv_linux_vers
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 25 Jan 2011 08:46:58 +0000 (09:46 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 25 Jan 2011 15:23:22 +0000 (16:23 +0100)
For some reason, tcpdump and libpcap need to have some information
about the kernel version being used. This information is passed using
the ac_cv_linux_vers autoconf variable.

However, the current value is determined using
BR2_DEFAULT_KERNEL_HEADERS which is only defined when an internal
Buildroot toolchain is used. So it would break with an external
toolchain or the Crosstool-NG backend.

According to Mike Frysinger at
http://lists.busybox.net/pipermail/buildroot/2011-January/040861.html,
this value is only used to determine if the kernel version is 0.x, 1.x
or 2.x, so passing ac_cv_linux_vers=2 is sufficient since Buildroot
only supports the 2.6 kernel anyway.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/libpcap/libpcap.mk
package/tcpdump/tcpdump.mk

index eebfc03d42848ac8f1090f130dcff1ed8e7741ed..a2d0376b7dc8dbe78228714511f1c085e8eff423 100644 (file)
@@ -14,7 +14,7 @@ LIBPCAP_INSTALL_TARGET_OPT= DESTDIR="$(TARGET_DIR)" \
 LIBPCAP_INSTALL_STAGING_OPT= DESTDIR="$(STAGING_DIR)" install \
        $(if $(BR2_PREFER_STATIC_LIB),,install-shared)
 LIBPCAP_DEPENDENCIES:=zlib
-LIBPCAP_CONF_ENV:=ac_cv_linux_vers=$(firstword $(subst .,$(space),$(firstword $(call qstrip,$(BR2_DEFAULT_KERNEL_HEADERS))))) \
+LIBPCAP_CONF_ENV:=ac_cv_linux_vers=2 \
                  ac_cv_header_linux_wireless_h=yes # configure misdetects this
 LIBPCAP_CONF_OPT:=--disable-yydebug --with-pcap=linux
 
index 81228169b06904c66e9ec2dc8942055c1a65a796..720a29acfb3d1f90c912a3e4da9a86ed3dfc3af1 100644 (file)
@@ -9,7 +9,7 @@
 TCPDUMP_VERSION:=4.1.1
 TCPDUMP_SITE:=http://www.tcpdump.org/release
 TCPDUMP_SOURCE:=tcpdump-$(TCPDUMP_VERSION).tar.gz
-TCPDUMP_CONF_ENV:=ac_cv_linux_vers=$(firstword $(subst .,$(space),$(firstword $(call qstrip,$(BR2_DEFAULT_KERNEL_HEADERS)))))
+TCPDUMP_CONF_ENV:=ac_cv_linux_vers=2
 TCPDUMP_CONF_OPT:=--without-crypto \
                $(if $(BR2_PACKAGE_TCPDUMP_SMB),--enable-smb,--disable-smb)
 TCPDUMP_DEPENDENCIES:=zlib libpcap