diff options
Diffstat (limited to 'meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.11/configure_in_cross.patch')
| -rw-r--r-- | meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.11/configure_in_cross.patch | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.11/configure_in_cross.patch b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.11/configure_in_cross.patch new file mode 100644 index 0000000000..88cf7e6777 --- /dev/null +++ b/meta-networking/recipes-protocols/rp-pppoe/rp-pppoe-3.11/configure_in_cross.patch | |||
| @@ -0,0 +1,156 @@ | |||
| 1 | From cab02076afb808a43c6ff3d7b1c64e71f5a1b397 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
| 3 | Date: Wed, 19 Aug 2015 12:17:03 +0900 | ||
| 4 | Subject: [PATCH] configure in cross | ||
| 5 | |||
| 6 | Update the configure script to cross-compiling with OE. This hard-codes | ||
| 7 | a few target paths, reworks a few tests to be more friendly for cross | ||
| 8 | and drops other tests. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [build system specific changes] | ||
| 11 | |||
| 12 | --- | ||
| 13 | src/configure.in | 66 ++++++++++++++------------------------------------------ | ||
| 14 | 1 file changed, 16 insertions(+), 50 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/src/configure.in b/src/configure.in | ||
| 17 | index e194295..82d64d6 100644 | ||
| 18 | --- a/src/configure.in | ||
| 19 | +++ b/src/configure.in | ||
| 20 | @@ -5,6 +5,13 @@ AC_INIT(pppoe.c) | ||
| 21 | dnl pppd directory for kernel-mode PPPoE | ||
| 22 | PPPD_DIR=ppp-2.4.1.pppoe2 | ||
| 23 | |||
| 24 | +dnl hard code some paths | ||
| 25 | +PPPD=/usr/sbin/pppd | ||
| 26 | +ID=/usr/bin/id | ||
| 27 | +ECHO=/bin/echo | ||
| 28 | +AC_ARG_VAR(PPPD) | ||
| 29 | +AC_ARG_VAR(ID) | ||
| 30 | + | ||
| 31 | AC_CONFIG_HEADER(config.h) | ||
| 32 | |||
| 33 | AC_PREFIX_DEFAULT(/usr) | ||
| 34 | @@ -45,7 +52,7 @@ ac_cv_struct_sockaddr_ll=no) | ||
| 35 | AC_MSG_RESULT($ac_cv_struct_sockaddr_ll) | ||
| 36 | |||
| 37 | if test "$ac_cv_struct_sockaddr_ll" = yes ; then | ||
| 38 | -AC_DEFINE(HAVE_STRUCT_SOCKADDR_LL) | ||
| 39 | +AC_DEFINE([HAVE_STRUCT_SOCKADDR_LL], [], [Have struct SOCKADDR_LL]) | ||
| 40 | fi | ||
| 41 | |||
| 42 | dnl Check for N_HDLC line discipline | ||
| 43 | @@ -56,7 +63,7 @@ AC_TRY_COMPILE([#include <linux/termios.h>], | ||
| 44 | ac_cv_n_hdlc=no) | ||
| 45 | AC_MSG_RESULT($ac_cv_n_hdlc) | ||
| 46 | if test "$ac_cv_n_hdlc" = yes ; then | ||
| 47 | -AC_DEFINE(HAVE_N_HDLC) | ||
| 48 | +AC_DEFINE([HAVE_N_HDLC], [], [Have N_HDLC]) | ||
| 49 | fi | ||
| 50 | |||
| 51 | AC_ARG_ENABLE(plugin, [ --enable-plugin=pppd_src_path build pppd plugin], ac_cv_pluginpath=$enableval, ac_cv_pluginpath=no) | ||
| 52 | @@ -104,7 +111,7 @@ PPPD_INCDIR="" | ||
| 53 | if test "$ac_cv_header_linux_if_pppox_h" = yes ; then | ||
| 54 | if test "$ac_cv_pluginpath" != no ; then | ||
| 55 | LINUX_KERNELMODE_PLUGIN=rp-pppoe.so | ||
| 56 | - AC_DEFINE(HAVE_LINUX_KERNEL_PPPOE) | ||
| 57 | + AC_DEFINE([HAVE_LINUX_KERNEL_PPPOE], [], [Have kernel PPPoE]) | ||
| 58 | PPPD_INCDIR=$ac_cv_pluginpath | ||
| 59 | fi | ||
| 60 | fi | ||
| 61 | @@ -114,7 +121,7 @@ if test "$PPPD_INCDIR" = "" ; then | ||
| 62 | fi | ||
| 63 | |||
| 64 | if test "$ac_cv_debugging" = "yes" ; then | ||
| 65 | - AC_DEFINE(DEBUGGING_ENABLED) | ||
| 66 | + AC_DEFINE([DEBUGGING_ENABLED], [], [Debugging enabled]) | ||
| 67 | fi | ||
| 68 | |||
| 69 | AC_SUBST(LINUX_KERNELMODE_PLUGIN) | ||
| 70 | @@ -140,15 +147,8 @@ AC_CHECK_SIZEOF(unsigned short) | ||
| 71 | AC_CHECK_SIZEOF(unsigned int) | ||
| 72 | AC_CHECK_SIZEOF(unsigned long) | ||
| 73 | |||
| 74 | -dnl Check for location of pppd | ||
| 75 | -AC_PATH_PROG(PPPD, pppd, NOTFOUND, $PATH:/sbin:/usr/sbin:/usr/local/sbin) | ||
| 76 | -AC_PATH_PROG(ECHO, echo, echo) | ||
| 77 | - | ||
| 78 | -dnl Check for setsid (probably Linux-specific) | ||
| 79 | -AC_PATH_PROG(SETSID, setsid, "", $PATH:/sbin:/usr/sbin:/usr/local/sbin) | ||
| 80 | - | ||
| 81 | dnl Check for an "id" which accepts "-u" option -- hack for Solaris. | ||
| 82 | -AC_PATH_PROG(ID, id, "", /usr/xpg4/bin:$PATH) | ||
| 83 | +dnl AC_PATH_PROG(ID, id, "", /usr/xpg4/bin:$PATH) | ||
| 84 | |||
| 85 | dnl Check for Linux-specific kernel support for PPPoE | ||
| 86 | AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support) | ||
| 87 | @@ -193,44 +193,8 @@ if test "$GCC" = yes; then | ||
| 88 | CFLAGS="$CFLAGS -fno-strict-aliasing -Wall -Wstrict-prototypes" | ||
| 89 | fi | ||
| 90 | |||
| 91 | -dnl If we couldn't find pppd, die | ||
| 92 | -if test "$PPPD" = "NOTFOUND"; then | ||
| 93 | - AC_MSG_WARN([*** Oops! I couldn't find pppd, the PPP daemon anywhere.]) | ||
| 94 | - AC_MSG_WARN([*** You must install pppd, version 2.3.10 or later.]) | ||
| 95 | - AC_MSG_WARN([*** I will keep going, but it may not work.]) | ||
| 96 | - PPPD=pppd | ||
| 97 | -fi | ||
| 98 | - | ||
| 99 | -dnl Figure out pppd version. 2.3.7 to 2.3.9 -- issue warning. Less than | ||
| 100 | -dnl 2.3.7 -- stop | ||
| 101 | - | ||
| 102 | -PPPD_VERSION=`$PPPD --version 2>&1 | awk ' /version/ {print $NF}'` | ||
| 103 | - | ||
| 104 | -case "$PPPD_VERSION" in | ||
| 105 | -1.*|2.0.*|2.1.*|2.2.*|2.3.0|2.3.1|2.3.2|2.3.3|2.3.4|2.3.5|2.3.6) | ||
| 106 | - AC_MSG_WARN([*** Oops! Your version of pppd is $PPPD_VERSION, which is too old.]) | ||
| 107 | - AC_MSG_WARN([*** You need at least 2.3.7 (2.3.10 or newer recommended.]) | ||
| 108 | - AC_MSG_WARN([*** I will keep going, but it may not work.]) | ||
| 109 | - ;; | ||
| 110 | - | ||
| 111 | -2.3.7|2.3.8|2.3.9) | ||
| 112 | - AC_MSG_WARN([*** Warning. Your version of pppd is $PPPD_VERSION. You will]) | ||
| 113 | - AC_MSG_WARN([*** not be able to use connect-on-demand. Upgrade to pppd]) | ||
| 114 | - AC_MSG_WARN([*** 2.3.10 or newer if you need connect-on-demand.]) | ||
| 115 | - ;; | ||
| 116 | - | ||
| 117 | -2*|3*|4*|5*|6*|7*|8*|9*) | ||
| 118 | - ;; | ||
| 119 | - | ||
| 120 | -*) | ||
| 121 | - AC_MSG_WARN([*** Oops. I cannot figure out what version of pppd you have.]) | ||
| 122 | - AC_MSG_WARN([*** All I got back was '$PPPD_VERSION']) | ||
| 123 | - AC_MSG_WARN([*** I will keep going, but it may not work.]) | ||
| 124 | - ;; | ||
| 125 | -esac | ||
| 126 | - | ||
| 127 | dnl Figure out packing order of structures | ||
| 128 | -AC_MSG_CHECKING([packing order of bit fields]) | ||
| 129 | +AC_CACHE_CHECK([packing order of bit fields],rpppoe_cv_pack_bitfields,[ | ||
| 130 | if test "${rpppoe_cv_pack_bitfields+set}" != set ; then | ||
| 131 | AC_TRY_RUN([ | ||
| 132 | union foo { | ||
| 133 | @@ -257,10 +221,11 @@ main(void) | ||
| 134 | }], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev, | ||
| 135 | $ECHO "no defaults for cross-compiling"; exit 0) | ||
| 136 | fi | ||
| 137 | +]) | ||
| 138 | |||
| 139 | if test "$rpppoe_cv_pack_bitfields" = "rev" ; then | ||
| 140 | AC_MSG_RESULT(reversed) | ||
| 141 | - AC_DEFINE(PACK_BITFIELDS_REVERSED) | ||
| 142 | + AC_DEFINE([PACK_BITFIELDS_REVERSED], [], [Reversed bitfields]) | ||
| 143 | else | ||
| 144 | AC_MSG_RESULT(normal) | ||
| 145 | fi | ||
| 146 | @@ -324,6 +289,7 @@ AC_SUBST(PPPOE_SERVER_DEPS) | ||
| 147 | AC_SUBST(RDYNAMIC) | ||
| 148 | AC_SUBST(LIBEVENT) | ||
| 149 | AC_SUBST(ECHO) | ||
| 150 | +AC_SUBST(HAVE_STRUCT_SOCKADDR_LL) | ||
| 151 | AC_SUBST(LDFLAGS) | ||
| 152 | |||
| 153 | datadir_evaluated=`eval echo $datadir` | ||
| 154 | -- | ||
| 155 | 1.8.4.2 | ||
| 156 | |||
