]> git.ozlabs.org Git - ppp.git/blob - configure
38b1d4363274c93b0200208353e53d1a72b8c878
[ppp.git] / configure
1 #!/bin/sh
2 # $Id: configure,v 1.5 1995/12/11 02:53:16 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       1.*)      state="known"; ksrc="freebsd-old";;
55       2.0*)     state="known"; ksrc="freebsd-2.0";;
56       2.[1-9]*) state="late"; ksrc="freebsd-2.0";;
57     esac;;
58   NeXTStep)
59     makext="NeXT";
60     ksrc="NeXT";
61     state="known";;
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 case $state in
73   ancient)
74     echo "This is an old release of a supported OS ($system)."
75     echo "This software cannot be used as-is on this system,"
76     echo "but you may be able to port it.  Good luck!"
77     exit;;
78   early)
79     echo "This is an old release of a supported OS ($system)."
80     echo "This software should install and run on this system,"
81     echo "but it hasn't been tested.";;
82   late)
83     echo "This is a newer release of $system than was available when"
84     echo "this software was released.  It may or may not work.";;
85   unknown)
86     echo "This software has not been ported to this system.  Sorry.";;
87 esac
88
89 if [ $ksrc ]; then
90   echo "Creating links to Makefiles."
91   rm -f Makefile
92   ln -s $ksrc/Makefile.top Makefile
93   echo "  Makefile -> $ksrc/Makefile.top"
94   if [ $ksrc = svr4 ]; then
95     rm -f $ksrc/Makefile
96     ln -s Makefile.$makext $ksrc/Makefile
97     echo "  $ksrc/Makefile -> Makefile.$makext"
98   fi
99   for dir in pppd pppstats chat; do
100     rm -f $dir/Makefile
101     ln -s Makefile.$makext $dir/Makefile
102     echo "  $dir/Makefile -> Makefile.$makext"
103   done
104 fi