e77b004418b1387c0e12da7fdc05c38665bfd5b3
[librecmc/librecmc.git] / obsolete-buildroot / sources / openwrt / patches / ppp / z01_ppp-2.4.2-openwrt.patch
1 diff -ruN ppp-2.4.2-old/chat/Makefile.linux ppp-2.4.2-new/chat/Makefile.linux
2 --- ppp-2.4.2-old/chat/Makefile.linux   2004-01-13 04:57:55.000000000 +0100
3 +++ ppp-2.4.2-new/chat/Makefile.linux   2004-08-23 12:48:50.000000000 +0200
4 @@ -6,8 +6,9 @@
5  CDEF4= -DFNDELAY=O_NDELAY              # Old name value
6  CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
7  
8 -COPTS= -O2 -g -pipe $(CDEFS)
9 -CFLAGS=        $(COPTS) $(CDEFS)
10 +COPTS = -O2
11 +COMPILE_FLAGS = $(CDEFS)
12 +CFLAGS = $(COPTS) $(COMPILE_FLAGS)
13  
14  INSTALL= install
15  
16 diff -ruN ppp-2.4.2-old/pppd/Makefile.linux ppp-2.4.2-new/pppd/Makefile.linux
17 --- ppp-2.4.2-old/pppd/Makefile.linux   2003-11-27 22:55:19.000000000 +0100
18 +++ ppp-2.4.2-new/pppd/Makefile.linux   2004-08-23 12:48:50.000000000 +0200
19 @@ -47,19 +47,19 @@
20  # Uncomment the next line to include support for PPP packet filtering.
21  # This requires that the libpcap library and headers be installed
22  # and that the kernel driver support PPP packet filtering.
23 -FILTER=y
24 +#FILTER=y
25  
26  # Uncomment the next line to enable multilink PPP (enabled by default)
27  # Linux distributions: Please leave multilink ENABLED in your builds
28  # of pppd!
29 -HAVE_MULTILINK=y
30 +#HAVE_MULTILINK=y
31  
32  # Uncomment the next line to enable the TDB database (enabled by default.)
33  # If you enable multilink, then TDB is automatically enabled also.
34  # Linux distributions: Please leave TDB ENABLED in your builds.
35 -USE_TDB=y
36 +#USE_TDB=y
37  
38 -HAS_SHADOW=y
39 +#HAS_SHADOW=y
40  #USE_PAM=y
41  #HAVE_INET6=y
42  
43 @@ -76,7 +76,7 @@
44  
45  INCLUDE_DIRS= -I../include
46  
47 -COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
48 +COMPILE_FLAGS= -DHAVE_PATHS_H
49  
50  CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
51  
52 @@ -192,7 +192,7 @@
53       CFLAGS += -DMAXOCTETS
54  endif
55  
56 -INSTALL= install -o root
57 +INSTALL= install
58  
59  all: $(TARGETS)
60  
61 diff -ruN ppp-2.4.2-old/pppd/plugins/Makefile.linux ppp-2.4.2-new/pppd/plugins/Makefile.linux
62 --- ppp-2.4.2-old/pppd/plugins/Makefile.linux   2004-01-13 04:56:24.000000000 +0100
63 +++ ppp-2.4.2-new/pppd/plugins/Makefile.linux   2004-08-23 12:48:50.000000000 +0200
64 @@ -1,12 +1,16 @@
65 -CC     = gcc
66 -COPTS  = -O2 -g
67 -CFLAGS = $(COPTS) -I.. -I../../include -fPIC
68 -LDFLAGS        = -shared
69 -INSTALL        = install -o root
70 +#CC = gcc
71 +COPTS = -O2
72 +COMPILE_FLAGS = -I.. -I../../include -fPIC
73 +LIBS =
74 +
75 +INSTALL = install
76 +
77 +CFLAGS = $(COPTS) $(COMPILE_FLAGS)
78 +LDFLAGS = -shared
79  
80  SUBDIRS := rp-pppoe
81  # Uncomment the next line to include the radius authentication plugin
82 -# SUBDIRS += radius
83 +SUBDIRS += radius
84  PLUGINS := minconn.so passprompt.so passwordfd.so
85  
86  # include dependencies if present
87 diff -ruN ppp-2.4.2-old/pppd/plugins/radius/Makefile.linux ppp-2.4.2-new/pppd/plugins/radius/Makefile.linux
88 --- ppp-2.4.2-old/pppd/plugins/radius/Makefile.linux    2002-11-09 12:24:42.000000000 +0100
89 +++ ppp-2.4.2-new/pppd/plugins/radius/Makefile.linux    2004-08-23 12:57:38.000000000 +0200
90 @@ -5,7 +5,12 @@
91  
92  MANDIR=/usr/man
93  PLUGIN=radius.so radattr.so radrealms.so
94 -CFLAGS=-I../.. -I../../../include -Iradiusclient/include -O2
95 +COPTS = -O2
96 +COMPILE_FLAGS = -I../.. -I../../../include -Iradiusclient/include -fPIC
97 +LIBS=
98 +
99 +CFLAGS=$(COPTS) $(COMPILE_FLAGS)
100 +LDFLAGS=-lradiusclient
101  
102  # Uncomment the next line to include support for Microsoft's
103  # MS-CHAP authentication protocol.
104 @@ -37,29 +42,34 @@
105         $(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
106  
107  radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o
108 -       gcc -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
109 +       $(CC) -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
110  
111  radattr.so: radattr.o
112 -       gcc -o radattr.so -shared radattr.o
113 +       $(CC) -o radattr.so -shared radattr.o
114  
115  radrealms.so: radrealms.o
116 -       gcc -o radrealms.so -shared radrealms.o
117 +       $(CC) -o radrealms.so -shared radrealms.o
118  
119  radius.o: radius.c
120 -       gcc $(CFLAGS) -c -o radius.o -fPIC radius.c
121 +       $(CC) -c $(CFLAGS) radius.c -o radius.o
122  
123  radattr.o: radattr.c
124 -       gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c
125 +       $(CC) -c $(CFLAGS) radattr.c -o radattr.o
126  
127  radrealms.o: radrealms.c
128 -       gcc $(CFLAGS) -c -o radrealms.o -fPIC radrealms.c
129 +       $(CC) -c $(CFLAGS) radrealms.c -o radrealms.o
130  
131  radiusclient/lib/.libs/libradiusclient.a:
132         test -r radiusclient/Makefile ||           \
133                 (cd radiusclient;                  \
134 +               rm -f config.cache ; \
135 +               aclocal ; \
136 +               autoconf ; \
137 +               ac_cv_func_setvbuf_reversed=no \
138 +               ac_cv_func_uname=no \
139                  ./configure --prefix=/usr         \
140                              --sysconfdir=/etc     \
141 -                            --enable-shared       \
142 +                            --disable-shared       \
143                              --enable-static)
144         $(MAKE) -C radiusclient
145  
146 diff -ruN ppp-2.4.2-old/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.2-new/pppd/plugins/rp-pppoe/Makefile.linux
147 --- ppp-2.4.2-old/pppd/plugins/rp-pppoe/Makefile.linux  2004-01-13 04:57:55.000000000 +0100
148 +++ ppp-2.4.2-new/pppd/plugins/rp-pppoe/Makefile.linux  2004-08-23 12:48:50.000000000 +0200
149 @@ -16,12 +16,16 @@
150  # Version is set ONLY IN THE MAKEFILE!  Don't delete this!
151  VERSION=3.3
152  
153 -COPTS=-O2 -g
154 -CFLAGS=$(COPTS) -I../../../include/linux
155 +#CC = gcc
156 +COPTS = -O2
157 +COMPILE_FLAGS = -I../../../include/linux -fPIC
158 +
159 +CFLAGS = $(COPTS) $(COMPILE_FLAGS)
160 +
161  all: rp-pppoe.so
162  
163  rp-pppoe.so: libplugin.a plugin.o
164 -       gcc -o rp-pppoe.so -shared plugin.o libplugin.a
165 +       $(CC) -o rp-pppoe.so -shared plugin.o libplugin.a
166  
167  install: all
168         $(INSTALL) -d -m 755 $(LIBDIR)
169 @@ -31,20 +35,20 @@
170         rm -f *.o *.so
171  
172  plugin.o: plugin.c
173 -       gcc '-DRP_VERSION="$(VERSION)"' $(CFLAGS) -I../../..  -c -o plugin.o -fPIC plugin.c
174 +       $(CC) -c $(CFLAGS) plugin.c '-DRP_VERSION="$(VERSION)"' -I../../..  -o plugin.o
175  
176  libplugin.a: discovery.o if.o common.o debug.o
177 -       ar -rc $@ $^
178 +       $(AR) -rc $@ $^
179  
180  discovery.o: discovery.c
181 -       gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o discovery.o -fPIC discovery.c
182 +       $(CC) -c $(CFLAGS) discovery.c '-DVERSION="$(VERSION)"' -o discovery.o
183  
184  if.o: if.c
185 -       gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o if.o -fPIC if.c
186 +       $(CC) -c $(CFLAGS) if.c '-DVERSION="$(VERSION)"' -o if.o
187  
188  debug.o: debug.c
189 -       gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o debug.o -fPIC debug.c
190 +       $(CC) -c $(CFLAGS) debug.c '-DVERSION="$(VERSION)"' -o debug.o
191  
192  common.o: common.c
193 -       gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o common.o -fPIC common.c
194 +       $(CC) -c $(CFLAGS) common.c '-DVERSION="$(VERSION)"' -o common.o
195  
196 diff -ruN ppp-2.4.2-old/pppdump/Makefile.linux ppp-2.4.2-new/pppdump/Makefile.linux
197 --- ppp-2.4.2-old/pppdump/Makefile.linux        1999-07-26 13:09:29.000000000 +0200
198 +++ ppp-2.4.2-new/pppdump/Makefile.linux        2004-08-23 12:48:50.000000000 +0200
199 @@ -1,4 +1,8 @@
200 -CFLAGS= -O -I../include/net
201 +#CC = gcc
202 +COPTS = -O
203 +COMPILE_FLAGS = -I../include/net
204 +CFLAGS= $(COPTS) $(COMPILE_FLAGS)
205 +
206  OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
207  
208  INSTALL= install
209 diff -ruN ppp-2.4.2-old/pppstats/Makefile.linux ppp-2.4.2-new/pppstats/Makefile.linux
210 --- ppp-2.4.2-old/pppstats/Makefile.linux       2002-11-09 12:24:43.000000000 +0100
211 +++ ppp-2.4.2-new/pppstats/Makefile.linux       2004-08-23 12:48:50.000000000 +0200
212 @@ -7,11 +7,11 @@
213  PPPSTATOBJS = pppstats.o
214  
215  #CC = gcc
216 -COPTS = -O
217 +COPTS = -O2
218  COMPILE_FLAGS = -I../include
219  LIBS =
220  
221 -INSTALL= install -o root -g daemon
222 +INSTALL= install
223  
224  CFLAGS = $(COPTS) $(COMPILE_FLAGS)
225