2 # $Id: configure,v 1.38 2008/06/15 07:08:49 paulus Exp $
4 # Where to install stuff by default
8 # if [ -d /NextApps ]; then
23 karch
=`/usr/bin/isainfo -k`
25 # [0-3]*) state="ancient";;
26 # 4*) state="known"; ksrc="sunos4"; makext="sunos4";;
27 5.
[7-9]*|
5.
[1-9][0-9]*) state
="known"; ksrc
="solaris"; makext
="sol2";
29 amd64
) archvariant
='-64x';;
30 sparcv9
) archvariant
='-64';;
33 5.
[1-6]*) state
="known"; ksrc
="solaris"; makext
="sol2";;
35 if [ "$1" = gcc
]; then
39 if [ "$1" = 32 ]; then
43 if [ -x /opt
/SUNWspro
/bin
/cc
-a "$usegcc" != gcc
] &&
44 /opt
/SUNWspro
/bin
/cc
-flags >/dev
/null
2>&1; then
45 if [ "$archvariant" = "-64x" ]; then
46 ( cd /tmp
; echo "int x;" > ppp$$.c
47 /opt
/SUNWspro
/bin
/cc
-c -errwarn -xchip=opteron
-xarch=amd64 ppp$$.c
>/dev
/null
2>&1 ||
(
48 echo "WorkShop C is unable to make 64 bit modules, and your $karch system needs"
49 echo "them. Consider upgrading cc on this machine."
56 elif gcc
--version >/dev
/null
2>&1; then
57 archvariant
=gcc
$archvariant
59 if [ "$archvariant" = "gcc-64" -o"$archvariant" = "gcc-64x" ]; then
60 ( cd /tmp
; touch ppp$$.c
61 gcc
-c -m64 ppp$$.c
>/dev
/null
2>&1 ||
(
62 echo "gcc is unable to make 64 bit modules, and your $karch system needs them."
63 echo "Consider upgrading gcc on this machine, or switching to Sun WorkShop."
71 echo "C compiler not found; hoping for the best."
73 NetBSD|FreeBSD|ULTRIX|OSF1|NeXTStep|SINIX-?|UNIX_SV|UNIX_System_V
)
78 # 0.*) state="ancient";;
79 # 1.0*) state="ancient";;
80 # 1.1*) state="known"; ksrc="netbsd-1.1";;
81 # 1.2*) state="known"; ksrc="netbsd-1.2"; makext="netbsd-1.2";;
83 # state="late"; ksrc="netbsd-1.2";;
88 # [0-3]*) state="ancient";;
89 # 4.[01]*) state="early"; ksrc="ultrix";;
90 # 4.[234]) state="known"; ksrc="ultrix";;
95 # V1.*) state="neolithic"; ksrc="osf1";;
96 # V[23].*) state="neolithic"; ksrc="osf1";;
97 # V4.*) state="known"; ksrc="osf1";;
98 # V[5-9]*) state="late"; ksrc="osf1";;
103 # 1.*) state="known"; ksrc="freebsd-old";;
104 # 2.[01]*) state="known"; ksrc="freebsd-2.0";;
105 # 2.2.[2-7]*) state="late"; ksrc="freebsd-2.0";;
106 # 2.2.8*) state="known"; ksrc="freebsd-2.2.8";;
107 # 3.[0-1]*) state="known"; ksrc="freebsd-3.0";;
115 # 5.4[01]) state=known; ksrc=svr4; makext=svr4;;
116 # 5.4[2-9]) state=late; ksrc=svr4; makext=svr4;;
118 # # Intel SVR4 systems come with a bug in the uname program. Unless
119 # # your provider fixed the bug, or you get a fix for it, uname -S will
120 # # overwrite the system name with the node name!
121 # UNIX_SV|UNIX_System_V|`uname -n`)
123 # 4.0) state=known; ksrc=svr4; makext=svr4;;
124 # 4.2) state=late; ksrc=svr4; makext=svr4;;
128 if [ -d "$ksrc" ]; then :; else
135 echo "This is a newer release on an outdated OS ($system)."
136 echo " This software may or may not work on this OS."
137 echo " You may want to download an older version of PPP for this OS.";;
139 echo "This is an old release of a supported OS ($system)."
140 echo "This software cannot be used as-is on this system,"
141 echo "but you may be able to port it. Good luck!"
144 echo "This is an old release of a supported OS ($system)."
145 echo "This software should install and run on this system,"
146 echo "but it hasn't been tested.";;
148 echo "This is a newer release of $system than is supported by"
149 echo "this software. It may or may not work.";;
151 echo "This software has not been ported to $system. Sorry.";;
153 echo "Support for $system has not been included"
154 echo "in this distribution. Sorry.";;
156 echo "Configuring for $system";;
160 while [ $# -gt 0 ]; do
166 val
=`expr "x$arg" : 'x[^=]*=\(.*\)'`
167 arg
=`expr "x$arg" : 'x\([^=]*\)=.*'`
170 if [ $# -eq 0 ]; then
171 echo "error: the $arg argument requires a value" 1>&2
179 --prefix) DESTDIR
=$val ;;
180 --sysconfdir) SYSCONF
=$val ;;
188 sed -e "s,@DESTDIR@,$DESTDIR,g" -e "s,@SYSCONF@,$SYSCONF,g" $1 >$2
192 if [ -d "$ksrc" ]; then
193 echo "Creating Makefiles."
194 mkmkf
$ksrc/Makefile.top Makefile
195 mkmkf
$ksrc/Makedefs
$compiletype Makedefs.com
196 for dir
in pppd pppstats chat pppdump pppd
/plugins pppd
/plugins
/rp-pppoe \
197 pppd
/plugins
/radius pppd
/plugins
/pppoatm \
198 pppd
/plugins
/pppol2tp
; do
199 mkmkf
$dir/Makefile.
$makext $dir/Makefile
201 if [ -f $ksrc/Makefile.
$makext$archvariant ]; then
202 mkmkf
$ksrc/Makefile.
$makext$archvariant $ksrc/Makefile
205 echo "Unable to locate kernel source $ksrc"