summaryrefslogtreecommitdiffstats
path: root/patches/ppp-2.4.4/ppp-2.4.4-cross-awareness.diff
blob: 12b9578bbe7bcd5bd455377c36df0a9e71fd2cbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Subject: pppd: make the self made configure cross aware
From: Juergen Beisert <juergen@kreuzholzen.de>

Give us a chance to setup targets Kernel and arch.

Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de>

---
 configure                           |   10 ++++++++++
 pppd/plugins/Makefile.linux         |    3 +--
 pppd/plugins/pppoatm/Makefile.linux |    1 -
 3 files changed, 11 insertions(+), 3 deletions(-)

Index: configure
===================================================================
--- configure.orig
+++ configure
@@ -14,6 +14,16 @@ SYSCONF=/etc
 #  fi
 state="unknown"
 
+if [ -n $TARGET_OS ]; then
+	system=$TARGET_OS
+fi
+if [ -n $TARGET_OS_VER ]; then
+	release=$TARGET_OS_VER
+fi
+if [ -n $TARGET_OS_ARCH ]; then
+	arch=$TARGET_OS_ARCH
+fi
+
 case $system in
   Linux)
     makext="linux";
Index: pppd/plugins/Makefile.linux
===================================================================
--- pppd/plugins/Makefile.linux.orig
+++ pppd/plugins/Makefile.linux
@@ -1,4 +1,3 @@
-CC	= gcc
 COPTS	= -O2 -g
 CFLAGS	= $(COPTS) -I.. -I../../include -fPIC
 LDFLAGS	= -shared
@@ -37,5 +36,5 @@ clean:
 	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d clean; done
 
 depend:
-	$(CPP) -M $(CFLAGS) *.c >.depend
+	$(CC) -M $(CFLAGS) *.c >.depend
 	for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d depend; done
Index: pppd/plugins/pppoatm/Makefile.linux
===================================================================
--- pppd/plugins/pppoatm/Makefile.linux.orig
+++ pppd/plugins/pppoatm/Makefile.linux
@@ -1,4 +1,3 @@
-CC	= gcc
 COPTS	= -O2 -g
 CFLAGS	= $(COPTS) -I../.. -I../../../include -fPIC
 LDFLAGS	= -shared