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