aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/libpcap
diff options
context:
space:
mode:
authorGraeme Gregory <dp@xora.org.uk>2010-03-15 15:41:53 +0000
committerGraeme Gregory <dp@xora.org.uk>2010-03-18 19:42:37 +0000
commit5f911bdab63fa06ad74764c4cfd707660fc2af4d (patch)
tree4d2679efe466b2ea8f8a2bf5ead7f50daf5fd510 /recipes/libpcap
parent3d701ecb179745aa311f373b4beb13b2f1e2cec6 (diff)
downloadopenembedded-5f911bdab63fa06ad74764c4cfd707660fc2af4d.tar.gz
libpcap_1.0.0.bb : apply patch to fix autoconf 2.64+ problems.
Patch was extracted from libpcap git and refreshed. Have to copy aclocal to acinclude to not lose the new macros when OE overwrites.
Diffstat (limited to 'recipes/libpcap')
-rw-r--r--recipes/libpcap/libpcap-1.0.0/0001-Fix-some-problems-that-show-up-in-autoconf-2.64-and-.patch140
-rw-r--r--recipes/libpcap/libpcap_1.0.0.bb5
2 files changed, 145 insertions, 0 deletions
diff --git a/recipes/libpcap/libpcap-1.0.0/0001-Fix-some-problems-that-show-up-in-autoconf-2.64-and-.patch b/recipes/libpcap/libpcap-1.0.0/0001-Fix-some-problems-that-show-up-in-autoconf-2.64-and-.patch
new file mode 100644
index 0000000000..bd5f725d36
--- /dev/null
+++ b/recipes/libpcap/libpcap-1.0.0/0001-Fix-some-problems-that-show-up-in-autoconf-2.64-and-.patch
@@ -0,0 +1,140 @@
+From d1a3a92fab103210ab5f61780a731bce9a8909b5 Mon Sep 17 00:00:00 2001
+From: Guy Harris <guy@alum.mit.edu>
+Date: Sat, 2 Jan 2010 14:15:46 -0800
+Subject: [PATCH] Fix some problems that show up in autoconf 2.64 and later.
+
+---
+ aclocal.m4 | 60 ++++++++++++++++++++++++++++++++++++---------------------
+ configure | 9 ++++---
+ configure.in | 2 +
+ 3 files changed, 45 insertions(+), 26 deletions(-)
+
+Index: libpcap-1.0.0/aclocal.m4
+===================================================================
+--- libpcap-1.0.0.orig/aclocal.m4
++++ libpcap-1.0.0/aclocal.m4
+@@ -23,30 +23,21 @@ dnl LBL autoconf macros
+ dnl
+
+ dnl
+-dnl Determine which compiler we're using (cc or gcc)
+-dnl If using gcc, determine the version number
+-dnl If using cc, require that it support ansi prototypes
+-dnl If using gcc, use -O2 (otherwise use -O)
+-dnl If using cc, explicitly specify /usr/local/include
+-dnl
+-dnl usage:
+-dnl
+-dnl AC_LBL_C_INIT(copt, incls)
+-dnl
+-dnl results:
++dnl Do whatever AC_LBL_C_INIT work is necessary before using AC_PROG_CC.
+ dnl
+-dnl $1 (copt set)
+-dnl $2 (incls set)
+-dnl CC
+-dnl LDFLAGS
+-dnl ac_cv_lbl_gcc_vers
+-dnl LBL_CFLAGS
++dnl It appears that newer versions of autoconf (2.64 and later) will,
++dnl if you use AC_TRY_COMPILE in a macro, stick AC_PROG_CC at the
++dnl beginning of the macro, even if the macro itself calls AC_PROG_CC.
++dnl See section 20.8 "Expanded Before Required" in the Autoconf
++dnl documentation.
++dnl
++dnl This causes a steaming heap of fail in our case, as we were, in
++dnl AC_LBL_C_INIT, doing the tests we now do in AC_LBL_C_PREPARE,
++dnl calling AC_PROG_CC, and then doing the tests we now do in
++dnl AC_LBL_C_INIT.
+ dnl
+-AC_DEFUN([AC_LBL_C_INIT],
+- [AC_PREREQ(2.12)
+- AC_BEFORE([$0], [AC_PROG_CC])
+- AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
+- AC_BEFORE([$0], [AC_LBL_DEVEL])
++AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC,
++[
+ AC_ARG_WITH(gcc, [ --without-gcc don't use gcc])
+ $1="-O"
+ $2=""
+@@ -72,7 +63,32 @@ AC_DEFUN([AC_LBL_C_INIT],
+ CC=cc
+ export CC
+ fi
+- AC_PROG_CC
++])
++
++dnl
++dnl Determine which compiler we're using (cc or gcc)
++dnl If using gcc, determine the version number
++dnl If using cc, require that it support ansi prototypes
++dnl If using gcc, use -O2 (otherwise use -O)
++dnl If using cc, explicitly specify /usr/local/include
++dnl
++dnl usage:
++dnl
++dnl AC_LBL_C_INIT(copt, incls)
++dnl
++dnl results:
++dnl
++dnl $1 (copt set)
++dnl $2 (incls set)
++dnl CC
++dnl LDFLAGS
++dnl ac_cv_lbl_gcc_vers
++dnl LBL_CFLAGS
++dnl
++AC_DEFUN(AC_LBL_C_INIT,
++ [AC_PREREQ(2.50)
++ AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
++ AC_BEFORE([$0], [AC_LBL_DEVEL])
+ if test "$GCC" = yes ; then
+ if test "$SHLICC2" = yes ; then
+ ac_cv_lbl_gcc_vers=2
+Index: libpcap-1.0.0/configure
+===================================================================
+--- libpcap-1.0.0.orig/configure
++++ libpcap-1.0.0/configure
+@@ -1893,9 +1893,6 @@ test -n "$target_alias" &&
+
+
+
+-
+-
+-
+ # Check whether --with-gcc was given.
+ if test "${with_gcc+set}" = set; then
+ withval=$with_gcc;
+@@ -1962,7 +1959,8 @@ fi
+ CC=cc
+ export CC
+ fi
+- ac_ext=c
++
++ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+@@ -2881,6 +2879,9 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS con
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
++
++
++
+ if test "$GCC" = yes ; then
+ if test "$SHLICC2" = yes ; then
+ ac_cv_lbl_gcc_vers=2
+Index: libpcap-1.0.0/configure.in
+===================================================================
+--- libpcap-1.0.0.orig/configure.in
++++ libpcap-1.0.0/configure.in
+@@ -12,6 +12,8 @@ AC_INIT(pcap.c)
+
+ AC_CANONICAL_SYSTEM
+
++AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS)
++AC_PROG_CC
+ AC_LBL_C_INIT(V_CCOPT, V_INCLS, V_LIBS)
+ AC_LBL_C_INLINE
+ AC_C___ATTRIBUTE__
diff --git a/recipes/libpcap/libpcap_1.0.0.bb b/recipes/libpcap/libpcap_1.0.0.bb
index 6dfc056930..2ce1bc44cc 100644
--- a/recipes/libpcap/libpcap_1.0.0.bb
+++ b/recipes/libpcap/libpcap_1.0.0.bb
@@ -5,6 +5,11 @@ SRC_URI = "http://www.tcpdump.org/release/libpcap-${PV}.tar.gz"
SRC_URI += "file://aclocal.patch;patch=1"
SRC_URI += "file://ieee80215-arphrd.patch;patch=1"
SRC_URI += "file://ldflags.patch;patch=1"
+SRC_URI += "file://0001-Fix-some-problems-that-show-up-in-autoconf-2.64-and-.patch;patch=1"
+
+do_configure_prepend() {
+ cat ${S}/aclocal.m4 >>${S}/acinclude.m4
+}
do_compile () {
oe_runmake