]> git.ozlabs.org Git - ppp.git/blob - configure
declare alloca for SINIX
[ppp.git] / configure
1 #!/bin/sh
2 # $Id: configure,v 1.10 1996/09/14 05:08:07 paulus Exp $
3
4 if [ -d /NextApps ]; then
5   system="NeXTStep"
6 else
7   system=`uname -s`
8   release=`uname -r`
9 fi
10 state="unknown"
11
12 case $system in
13   NetBSD)
14     makext="bsd";
15     case $release in
16       0.*)      state="ancient";;
17       1.0*)     state="known"; ksrc="netbsd-1.0";;
18       1.1*)     state="known"; ksrc="netbsd-1.1";;
19       1.[2-9]*|[2-9]*)
20                 state="late"; ksrc="netbsd-1.1";;
21     esac;;
22   SunOS)
23     case $release in
24       [0-3]*)   state="ancient";;
25       4*)       state="known"; ksrc="sunos4"; makext="sunos4";;
26       5*)       state="known"; ksrc="svr4"; makext="sol2";;
27     esac;;
28   ULTRIX)
29     makext="ultrix";
30     case $release in
31       [0-3]*)   state="ancient";;
32       4.[01]*)  state="early"; ksrc="ultrix";;
33       4.[234])  state="known"; ksrc="ultrix";;
34     esac;;
35   OSF1)
36     makext="osf";
37     case $release in
38       V1.*)   state="ancient"; ksrc="osf1";;
39       V[23].*)  state="known"; ksrc="osf1";;
40       V[4-9]*) state="late"; ksrc="osf1";;
41     esac;;
42   Linux)
43     makext="linux";
44     ksrc="linux";
45     state="known";;
46   FreeBSD)
47     makext="bsd";
48     case $release in
49       1.*)      state="known"; ksrc="freebsd-old";;
50       2.0*)     state="known"; ksrc="freebsd-2.0";;
51       2.[1-9]*) state="late"; ksrc="freebsd-2.0";;
52     esac;;
53   NeXTStep)
54     makext="NeXT";
55     ksrc="NeXT";
56     state="known";;
57   SINIX-?)
58     case $release in
59       5.4[01]) state=known; ksrc=svr4; makext=svr4;;
60       5.4[2-9]) state=late; ksrc=svr4; makext=svr4;;
61     esac;;
62   # Intel SVR4 systems come with a bug in the uname program.  Unless
63   # your provider fixed the bug, or you get a fix for it, uname -S will
64   # overwrite the system name with the node name!
65   UNIX_System_V|`uname -n`)
66     case $release in
67       4.0) state=known; ksrc=svr4; makext=svr4;;
68       4.2) state=late; ksrc=svr4; makext=svr4;;
69     esac;;
70 esac
71
72 if [ -d "$ksrc" ]; then :; else
73   state="notincluded"
74   unset ksrc
75 fi
76
77 case $state in
78   ancient)
79     echo "This is an old release of a supported OS ($system)."
80     echo "This software cannot be used as-is on this system,"
81     echo "but you may be able to port it.  Good luck!"
82     exit;;
83   early)
84     echo "This is an old release of a supported OS ($system)."
85     echo "This software should install and run on this system,"
86     echo "but it hasn't been tested.";;
87   late)
88     echo "This is a newer release of $system than was available when"
89     echo "this software was released.  It may or may not work.";;
90   unknown)
91     echo "This software has not been ported to this system.  Sorry.";;
92   notincluded)
93     echo "Support for this system has not been included"
94     echo "in this distribution.  Sorry.";;
95 esac
96
97 if [ -d "$ksrc" ]; then
98   echo "Creating links to Makefiles."
99   rm -f Makefile
100   ln -s $ksrc/Makefile.top Makefile
101   echo "  Makefile -> $ksrc/Makefile.top"
102   if [ $ksrc = svr4 ]; then
103     rm -f $ksrc/Makefile
104     ln -s Makefile.$makext $ksrc/Makefile
105     echo "  $ksrc/Makefile -> Makefile.$makext"
106   fi
107   for dir in pppd pppstats chat; do
108     rm -f $dir/Makefile
109     ln -s Makefile.$makext $dir/Makefile
110     echo "  $dir/Makefile -> Makefile.$makext"
111   done
112 fi