CPU: Wrong CPU Load %.
[tomato.git] / release / src / router / ppp / configure
blob72fbb1795ea2f9ce367ada12adc503815d5f018a
1 #!/bin/sh
2 # $Id: configure,v 1.1.1.4 2003/10/14 08:09:52 sparq Exp $
4 # if [ -d /NextApps ]; then
5 # system="NeXTStep"
6 # else
7 system=`uname -s`
8 release=`uname -r`
9 machine=`uname -p`
10 arch=`uname -m`
11 # fi
12 state="unknown"
14 case $system in
15 Linux)
16 makext="linux";
17 ksrc="linux";
18 state="known";;
19 SunOS)
20 case $release in
21 # [0-3]*) state="ancient";;
22 # 4*) state="known"; ksrc="sunos4"; makext="sunos4";;
23 5.[1-6]*) state="known"; ksrc="solaris"; makext="sol2";;
24 5.[7-9]*) state="known"; ksrc="solaris"; makext="sol2";
25 case $arch in
26 sun4u) lp64='y';;
27 *) ;;
28 esac;;
29 esac;;
30 NetBSD|FreeBSD|ULTRIX|OSF1|NeXTStep|SINIX-?|UNIX_SV|UNIX_System_V)
31 state="notincluded";;
32 # NetBSD)
33 # makext="bsd";
34 # case $release in
35 # 0.*) state="ancient";;
36 # 1.0*) state="ancient";;
37 # 1.1*) state="known"; ksrc="netbsd-1.1";;
38 # 1.2*) state="known"; ksrc="netbsd-1.2"; makext="netbsd-1.2";;
39 # 1.[3-9]*|[2-9]*)
40 # state="late"; ksrc="netbsd-1.2";;
41 # esac;;
42 # ULTRIX)
43 # makext="ultrix";
44 # case $release in
45 # [0-3]*) state="ancient";;
46 # 4.[01]*) state="early"; ksrc="ultrix";;
47 # 4.[234]) state="known"; ksrc="ultrix";;
48 # esac;;
49 # OSF1)
50 # makext="osf";
51 # case $release in
52 # V1.*) state="neolithic"; ksrc="osf1";;
53 # V[23].*) state="neolithic"; ksrc="osf1";;
54 # V4.*) state="known"; ksrc="osf1";;
55 # V[5-9]*) state="late"; ksrc="osf1";;
56 # esac;;
57 # FreeBSD)
58 # makext="bsd";
59 # case $release in
60 # 1.*) state="known"; ksrc="freebsd-old";;
61 # 2.[01]*) state="known"; ksrc="freebsd-2.0";;
62 # 2.2.[2-7]*) state="late"; ksrc="freebsd-2.0";;
63 # 2.2.8*) state="known"; ksrc="freebsd-2.2.8";;
64 # 3.[0-1]*) state="known"; ksrc="freebsd-3.0";;
65 # esac;;
66 # NeXTStep)
67 # makext="NeXT";
68 # ksrc="NeXT";
69 # state="known";;
70 # SINIX-?)
71 # case $release in
72 # 5.4[01]) state=known; ksrc=svr4; makext=svr4;;
73 # 5.4[2-9]) state=late; ksrc=svr4; makext=svr4;;
74 # esac;;
75 # # Intel SVR4 systems come with a bug in the uname program. Unless
76 # # your provider fixed the bug, or you get a fix for it, uname -S will
77 # # overwrite the system name with the node name!
78 # UNIX_SV|UNIX_System_V|`uname -n`)
79 # case $release in
80 # 4.0) state=known; ksrc=svr4; makext=svr4;;
81 # 4.2) state=late; ksrc=svr4; makext=svr4;;
82 # esac;;
83 esac
85 if [ -d "$ksrc" ]; then :; else
86 state="notincluded"
87 unset ksrc
90 case $state in
91 neolithic)
92 echo "This is a newer release on an outdated OS ($system)."
93 echo " This software may or may not work on this OS."
94 echo " You may want to download an older version of PPP for this OS.";;
95 ancient)
96 echo "This is an old release of a supported OS ($system)."
97 echo "This software cannot be used as-is on this system,"
98 echo "but you may be able to port it. Good luck!"
99 exit;;
100 early)
101 echo "This is an old release of a supported OS ($system)."
102 echo "This software should install and run on this system,"
103 echo "but it hasn't been tested.";;
104 late)
105 echo "This is a newer release of $system than is supported by"
106 echo "this software. It may or may not work.";;
107 unknown)
108 echo "This software has not been ported to this system. Sorry.";;
109 notincluded)
110 echo "Support for this system has not been included"
111 echo "in this distribution. Sorry.";;
112 esac
114 orig_makext=$makext
116 if [ -d "$ksrc" ]; then
117 echo "Creating links to Makefiles."
118 rm -f Makefile
119 ln -s $ksrc/Makefile.top Makefile
120 echo " Makefile -> $ksrc/Makefile.top"
121 if [ "$ksrc" = solaris ]; then
122 # Point to 64-bit Makefile extension
123 if [ "$lp64" = y ]; then
124 makext=$makext-64
126 rm -f $ksrc/Makefile
127 ln -s Makefile.$makext $ksrc/Makefile
128 echo " $ksrc/Makefile -> Makefile.$makext"
129 # Restore extension
130 if [ "$lp64" = y ]; then
131 makext=$orig_makext
134 for dir in pppd pppstats chat pppdump pppd/plugins pppd/plugins/pppoe; do
135 rm -f $dir/Makefile
136 if [ -f $dir/Makefile.$makext ]; then
137 ln -s Makefile.$makext $dir/Makefile
138 echo " $dir/Makefile -> Makefile.$makext"
140 done