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