From patchwork Wed Nov 28 14:42:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 202465 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 9818E2C0040 for ; Thu, 29 Nov 2012 01:42:52 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0861B101677; Wed, 28 Nov 2012 14:42:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ofnFEuojHOAW; Wed, 28 Nov 2012 14:42:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id A5665100C8B; Wed, 28 Nov 2012 14:42:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CA34D8F74A for ; Wed, 28 Nov 2012 14:42:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0769880ADE for ; Wed, 28 Nov 2012 14:42:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QODlbAzD1cgb for ; Wed, 28 Nov 2012 14:42:42 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.enix.org (smtp.enix.org [193.19.211.146]) by whitealder.osuosl.org (Postfix) with ESMTPS id 60EE3805DD for ; Wed, 28 Nov 2012 14:42:42 +0000 (UTC) Received: from [82.247.183.72] (helo=localhost) by smtp.enix.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1TdiqV-0006Vp-GH for buildroot@uclibc.org; Wed, 28 Nov 2012 15:42:39 +0100 From: Thomas Petazzoni To: buildroot@uclibc.org Date: Wed, 28 Nov 2012 15:42:38 +0100 Message-Id: <1354113758-23544-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH v2] libpcap: fix static build X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net The libpcap package contained some interesting attempts to support a static-only build, but it was not working: http://autobuild.buildroot.org/results/01038d3b970092d894d2bae80679247e65722785/build-end.log In fact the configure.in of libpcap has provision to support --enable-shared/--disable-shared, but the generated configure script in the libpcap package has not been regenerated with the configure.in changes. So basically, enabling LIBPCAP_AUTORECONF=YES ensures that the configure script gets generated, which brings us a working --enable-shared / --disable-shared. Signed-off-by: Thomas Petazzoni --- v2: Add comment above the AUTORECONF=YES line that explains why it is needed. --- package/libpcap/libpcap.mk | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/package/libpcap/libpcap.mk b/package/libpcap/libpcap.mk index 7a1d32f..d35c228 100644 --- a/package/libpcap/libpcap.mk +++ b/package/libpcap/libpcap.mk @@ -10,11 +10,16 @@ LIBPCAP_LICENSE = BSD-3c LIBPCAP_LICENSE_FILES = LICENSE LIBPCAP_INSTALL_STAGING = YES -# doesn't have an install-strip -LIBPCAP_INSTALL_TARGET_OPT= DESTDIR="$(TARGET_DIR)" \ - $(if $(BR2_PREFER_STATIC_LIB),install,install-shared) -LIBPCAP_INSTALL_STAGING_OPT= DESTDIR="$(STAGING_DIR)" install \ - $(if $(BR2_PREFER_STATIC_LIB),,install-shared) +# The configure.in file contains the necessary code to handle +# --enable-shared/--disable-shared properly, but the configure script +# bundled with the libpcap tarball is not up-to-date with the +# configure.in file. In order to get proper handling of +# --enable-shared/--disable-shared, which is needed when doing a +# static library build, we autoreconfigure this package. This can be +# removed when bumping libpcap, after checking that the bundled +# configure script correctly handles --enable-shared/--disable-shared. +LIBPCAP_AUTORECONF = YES + LIBPCAP_DEPENDENCIES = zlib \ $(if $(BR2_PACKAGE_LIBUSB),libusb) LIBPCAP_CONF_ENV = ac_cv_linux_vers=2 \