]> git.ozlabs.org Git - ppp.git/blob - configure
inc
[ppp.git] / configure
1 #!/bin/sh
2 # $Id: configure,v 1.3 1995/06/01 01:48:44 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="svr4";;
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 esac
62
63 case $state in
64   ancient)
65     echo "This is an old release of a supported OS ($system)."
66     echo "This software cannot be used as-is on this system,"
67     echo "but you may be able to port it.  Good luck!"
68     exit;;
69   early)
70     echo "This is an old release of a supported OS ($system)."
71     echo "This software should install and run on this system,"
72     echo "but it hasn't been tested.";;
73   late)
74     echo "This is a newer release of $system than was available when"
75     echo "this software was released.  It may or may not work.";;
76   unknown)
77     echo "This software has not been ported to this system.  Sorry.";;
78 esac
79
80 if [ $ksrc ]; then
81   echo "Creating links to Makefiles."
82   rm -f Makefile
83   ln -s $ksrc/Makefile.top Makefile
84   echo "  Makefile -> $ksrc/Makefile.top"
85   for dir in pppd pppstats chat; do
86     rm -f $dir/Makefile
87     ln -s Makefile.$makext $dir/Makefile
88     echo "  $dir/Makefile -> Makefile.$makext"
89   done
90 fi