2 # $Id: configure,v 1.35 2004/11/06 11:36:54 paulus Exp $
4 # Where to install stuff by default
8 # if [ -d /NextApps ]; then
24 # [0-3]*) state="ancient";;
25 # 4*) state="known"; ksrc="sunos4"; makext="sunos4";;
26 5.
[7-9]*|
5.
[1-9][0-9]) state
="known"; ksrc
="solaris"; makext
="sol2";
27 case "`/usr/bin/isainfo -k`" in
28 sparcv9
) archvariant
='-64';;
31 5.
[1-6]*) state
="known"; ksrc
="solaris"; makext
="sol2";;
33 if [ -x /opt
/SUNWspro
/bin
/cc
-a "$1" != "gcc" ] &&
34 /opt
/SUNWspro
/bin
/cc
-flags >/dev
/null
2>&1; then
35 : # use Sun WorkShop compiler
36 elif gcc
--version >/dev
/null
2>&1; then
37 archvariant
=gcc
$archvariant
39 if [ "$archvariant" = "gcc-64" ]; then
40 ( cd /tmp
; touch ppp$$.c
41 gcc
-c -m64 ppp$$.c
>/dev
/null
2>&1 ||
(
42 echo "gcc is unable to make 64 bit modules, and your $arch system needs them."
43 echo "consider upgrading gcc on this machine, or switching to Sun WorkShop."
51 echo "C compiler not found; hoping for the best."
53 NetBSD|FreeBSD|ULTRIX|OSF1|NeXTStep|SINIX-?|UNIX_SV|UNIX_System_V
)
58 # 0.*) state="ancient";;
59 # 1.0*) state="ancient";;
60 # 1.1*) state="known"; ksrc="netbsd-1.1";;
61 # 1.2*) state="known"; ksrc="netbsd-1.2"; makext="netbsd-1.2";;
63 # state="late"; ksrc="netbsd-1.2";;
68 # [0-3]*) state="ancient";;
69 # 4.[01]*) state="early"; ksrc="ultrix";;
70 # 4.[234]) state="known"; ksrc="ultrix";;
75 # V1.*) state="neolithic"; ksrc="osf1";;
76 # V[23].*) state="neolithic"; ksrc="osf1";;
77 # V4.*) state="known"; ksrc="osf1";;
78 # V[5-9]*) state="late"; ksrc="osf1";;
83 # 1.*) state="known"; ksrc="freebsd-old";;
84 # 2.[01]*) state="known"; ksrc="freebsd-2.0";;
85 # 2.2.[2-7]*) state="late"; ksrc="freebsd-2.0";;
86 # 2.2.8*) state="known"; ksrc="freebsd-2.2.8";;
87 # 3.[0-1]*) state="known"; ksrc="freebsd-3.0";;
95 # 5.4[01]) state=known; ksrc=svr4; makext=svr4;;
96 # 5.4[2-9]) state=late; ksrc=svr4; makext=svr4;;
98 # # Intel SVR4 systems come with a bug in the uname program. Unless
99 # # your provider fixed the bug, or you get a fix for it, uname -S will
100 # # overwrite the system name with the node name!
101 # UNIX_SV|UNIX_System_V|`uname -n`)
103 # 4.0) state=known; ksrc=svr4; makext=svr4;;
104 # 4.2) state=late; ksrc=svr4; makext=svr4;;
108 if [ -d "$ksrc" ]; then :; else
115 echo "This is a newer release on an outdated OS ($system)."
116 echo " This software may or may not work on this OS."
117 echo " You may want to download an older version of PPP for this OS.";;
119 echo "This is an old release of a supported OS ($system)."
120 echo "This software cannot be used as-is on this system,"
121 echo "but you may be able to port it. Good luck!"
124 echo "This is an old release of a supported OS ($system)."
125 echo "This software should install and run on this system,"
126 echo "but it hasn't been tested.";;
128 echo "This is a newer release of $system than is supported by"
129 echo "this software. It may or may not work.";;
131 echo "This software has not been ported to $system. Sorry.";;
133 echo "Support for $system has not been included"
134 echo "in this distribution. Sorry.";;
136 echo "Configuring for $system";;
140 while [ $# -gt 0 ]; do
146 val
=`expr "x$arg" : 'x[^=]*=\(.*\)'`
147 arg
=`expr "x$arg" : 'x\([^=]*\)=.*'`
150 if [ $# -eq 0 ]; then
151 echo "error: the $arg argument requires a value" 1>&2
159 --prefix) DESTDIR
=$val ;;
160 --sysconfdir) SYSCONF
=$val ;;
168 sed -e "s,@DESTDIR@,$DESTDIR,g" -e "s,@SYSCONF@,$SYSCONF,g" $1 >$2
172 if [ -d "$ksrc" ]; then
173 echo "Creating Makefiles."
174 mkmkf
$ksrc/Makefile.top Makefile
175 mkmkf
$ksrc/Makedefs
$compiletype Makedefs.com
176 for dir
in pppd pppstats chat pppdump pppd
/plugins pppd
/plugins
/rp-pppoe \
177 pppd
/plugins
/radius pppd
/plugins
/pppoatm
; do
178 mkmkf
$dir/Makefile.
$makext $dir/Makefile
180 if [ "$archvariant" ]; then
181 mkmkf
$ksrc/Makefile.
$makext$archvariant $ksrc/Makefile
184 echo "Unable to locate kernel source $ksrc"