make log output a bit nicer
[openwrt.git] / openwrt / package / rp-pppoe / patches / rp-pppoe-3.5-configure.patch
1 diff -ruN rp-pppoe-3.5-orig/src/configure rp-pppoe-3.5-4/src/configure
2 --- rp-pppoe-3.5-orig/src/configure 2002-07-08 16:38:24.000000000 +0200
3 +++ rp-pppoe-3.5-4/src/configure 2005-03-09 16:37:38.000000000 +0100
4 @@ -1707,6 +1707,7 @@
5 #line 1708 "configure"
6 #include "confdefs.h"
7 #include <stdio.h>
8 +#include <sys/types.h>
9 main()
10 {
11 FILE *f=fopen("conftestval", "w");
12 @@ -1715,7 +1716,7 @@
13 exit(0);
14 }
15 EOF
16 -if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
17 +if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18 then
19 ac_cv_sizeof_unsigned_short=`cat conftestval`
20 else
21 @@ -1735,7 +1736,7 @@
22
23
24 echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
25 -echo "configure:1739: checking size of unsigned int" >&5
26 +echo "configure:1740: checking size of unsigned int" >&5
27 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
28 echo $ac_n "(cached) $ac_c" 1>&6
29 else
30 @@ -1743,9 +1744,10 @@
31 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
32 else
33 cat > conftest.$ac_ext <<EOF
34 -#line 1747 "configure"
35 +#line 1748 "configure"
36 #include "confdefs.h"
37 #include <stdio.h>
38 +#include <sys/types.h>
39 main()
40 {
41 FILE *f=fopen("conftestval", "w");
42 @@ -1754,7 +1756,7 @@
43 exit(0);
44 }
45 EOF
46 -if { (eval echo configure:1758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
47 +if { (eval echo configure:1760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
48 then
49 ac_cv_sizeof_unsigned_int=`cat conftestval`
50 else
51 @@ -1774,7 +1776,7 @@
52
53
54 echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
55 -echo "configure:1778: checking size of unsigned long" >&5
56 +echo "configure:1780: checking size of unsigned long" >&5
57 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
58 echo $ac_n "(cached) $ac_c" 1>&6
59 else
60 @@ -1782,9 +1784,10 @@
61 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
62 else
63 cat > conftest.$ac_ext <<EOF
64 -#line 1786 "configure"
65 +#line 1788 "configure"
66 #include "confdefs.h"
67 #include <stdio.h>
68 +#include <sys/types.h>
69 main()
70 {
71 FILE *f=fopen("conftestval", "w");
72 @@ -1793,7 +1796,7 @@
73 exit(0);
74 }
75 EOF
76 -if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
77 +if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
78 then
79 ac_cv_sizeof_unsigned_long=`cat conftestval`
80 else
81 @@ -1816,7 +1819,7 @@
82 # Extract the first word of "pppd", so it can be a program name with args.
83 set dummy pppd; ac_word=$2
84 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
85 -echo "configure:1820: checking for $ac_word" >&5
86 +echo "configure:1823: checking for $ac_word" >&5
87 if eval "test \"`echo '$''{'ac_cv_path_PPPD'+set}'`\" = set"; then
88 echo $ac_n "(cached) $ac_c" 1>&6
89 else
90 @@ -1853,7 +1856,7 @@
91 # Extract the first word of "setsid", so it can be a program name with args.
92 set dummy setsid; ac_word=$2
93 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
94 -echo "configure:1857: checking for $ac_word" >&5
95 +echo "configure:1860: checking for $ac_word" >&5
96 if eval "test \"`echo '$''{'ac_cv_path_SETSID'+set}'`\" = set"; then
97 echo $ac_n "(cached) $ac_c" 1>&6
98 else
99 @@ -1890,7 +1893,7 @@
100 # Extract the first word of "id", so it can be a program name with args.
101 set dummy id; ac_word=$2
102 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
103 -echo "configure:1894: checking for $ac_word" >&5
104 +echo "configure:1897: checking for $ac_word" >&5
105 if eval "test \"`echo '$''{'ac_cv_path_ID'+set}'`\" = set"; then
106 echo $ac_n "(cached) $ac_c" 1>&6
107 else
108 @@ -1925,14 +1928,11 @@
109
110
111 echo $ac_n "checking for Linux 2.4.X kernel-mode PPPoE support""... $ac_c" 1>&6
112 -echo "configure:1929: checking for Linux 2.4.X kernel-mode PPPoE support" >&5
113 -if test "`uname -s`" = "Linux" ; then
114 -modprobe ppp_generic > /dev/null 2>&1
115 -modprobe ppp_async > /dev/null 2>&1
116 -modprobe n_hdlc > /dev/null 2>&1
117 -modprobe ppp_synctty > /dev/null 2>&1
118 -modprobe pppoe > /dev/null 2>&1
119 -if test "$cross_compiling" = yes; then
120 +echo "configure:1932: checking for Linux 2.4.X kernel-mode PPPoE support" >&5
121 +if eval "test \"`echo '$''{'ac_cv_linux_kernel_pppoe'+set}'`\" = set"; then
122 + echo $ac_n "(cached) $ac_c" 1>&6
123 +else
124 + if test "$cross_compiling" = yes; then
125 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
126 else
127 cat > conftest.$ac_ext <<EOF
128 @@ -1960,10 +1960,10 @@
129 rm -fr conftest*
130 fi
131
132 -else
133 - ac_cv_linux_kernel_pppoe=no
134 fi
135
136 +echo "$ac_t""$ac_cv_linux_kernel_pppoe" 1>&6
137 +
138 $ECHO $ac_cv_linux_kernel_pppoe
139 if test "$ac_cv_linux_kernel_pppoe" != yes ; then
140 if test "$LINUX_KERNELMODE_PLUGIN" = rp-pppoe.so; then
141 @@ -2018,11 +2018,14 @@
142
143 echo $ac_n "checking packing order of bit fields""... $ac_c" 1>&6
144 echo "configure:2021: checking packing order of bit fields" >&5
145 -if test "$cross_compiling" = yes; then
146 +if eval "test \"`echo '$''{'ac_cv_pack_bitfields_reversed'+set}'`\" = set"; then
147 + echo $ac_n "(cached) $ac_c" 1>&6
148 +else
149 + if test "$cross_compiling" = yes; then
150 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
151 else
152 cat > conftest.$ac_ext <<EOF
153 -#line 2026 "configure"
154 +#line 2029 "configure"
155 #include "confdefs.h"
156
157 union foo {
158 @@ -2048,20 +2051,23 @@
159 }
160 }
161 EOF
162 -if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
163 +if { (eval echo configure:2055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
164 then
165 - PACK=normal
166 + ac_cv_pack_bitfields_reversed=no
167 else
168 echo "configure: failed program was:" >&5
169 cat conftest.$ac_ext >&5
170 rm -fr conftest*
171 - PACK=rev
172 + ac_cv_pack_bitfields_reversed=yes
173 fi
174 rm -fr conftest*
175 fi
176
177 +fi
178 +
179 +echo "$ac_t""$ac_cv_pack_bitfields_reversed" 1>&6
180
181 -if test "$PACK" = "rev" ; then
182 +if test "$ac_cv_pack_bitfields_reversed" = "yes" ; then
183 $ECHO "reversed"
184 cat >> confdefs.h <<\EOF
185 #define PACK_BITFIELDS_REVERSED 1
186 diff -ruN rp-pppoe-3.5-orig/src/configure.in rp-pppoe-3.5-4/src/configure.in
187 --- rp-pppoe-3.5-orig/src/configure.in 2002-07-08 16:38:24.000000000 +0200
188 +++ rp-pppoe-3.5-4/src/configure.in 2005-03-09 16:37:38.000000000 +0100
189 @@ -130,15 +130,8 @@
190 AC_PATH_PROG(ID, id, "", /usr/xpg4/bin:$PATH)
191
192 dnl Check for Linux-specific kernel support for PPPoE
193 -AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support)
194 -if test "`uname -s`" = "Linux" ; then
195 -dnl Do a bunch of modprobes. Can't hurt; might help.
196 -modprobe ppp_generic > /dev/null 2>&1
197 -modprobe ppp_async > /dev/null 2>&1
198 -modprobe n_hdlc > /dev/null 2>&1
199 -modprobe ppp_synctty > /dev/null 2>&1
200 -modprobe pppoe > /dev/null 2>&1
201 -AC_TRY_RUN([#include <sys/socket.h>
202 +AC_CACHE_CHECK([for Linux 2.4.X kernel-mode PPPoE support], ac_cv_linux_kernel_pppoe,
203 +[AC_TRY_RUN([#include <sys/socket.h>
204 #include <net/ethernet.h>
205 #include <linux/if.h>
206 #include <linux/if_pppox.h>
207 @@ -146,10 +139,7 @@
208 {
209 if (socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OE) >= 0) return 0; else return 1;
210 }
211 -], ac_cv_linux_kernel_pppoe=yes, ac_cv_linux_kernel_pppoe=no)
212 -else
213 - ac_cv_linux_kernel_pppoe=no
214 -fi
215 +], ac_cv_linux_kernel_pppoe=yes, ac_cv_linux_kernel_pppoe=no)])
216
217 $ECHO $ac_cv_linux_kernel_pppoe
218 if test "$ac_cv_linux_kernel_pppoe" != yes ; then
219 @@ -208,8 +198,8 @@
220 esac
221
222 dnl Figure out packing order of structures
223 -AC_MSG_CHECKING(packing order of bit fields)
224 -AC_TRY_RUN([
225 +AC_CACHE_CHECK([packing order of bit fields], ac_cv_pack_bitfields_reversed,
226 +[AC_TRY_RUN([
227 union foo {
228 struct bar {
229 unsigned int ver:4;
230 @@ -231,9 +221,9 @@
231 } else {
232 return 2;
233 }
234 -}], PACK=normal, PACK=rev)
235 +}], ac_cv_pack_bitfields_reversed=no, ac_cv_pack_bitfields_reversed=yes)])
236
237 -if test "$PACK" = "rev" ; then
238 +if test "$ac_cv_pack_bitfields_reversed" = "yes" ; then
239 $ECHO "reversed"
240 AC_DEFINE(PACK_BITFIELDS_REVERSED)
241 else
This page took 0.058892 seconds and 5 git commands to generate.