]> git.ozlabs.org Git - ppp.git/blob - configure
add add_fd and remove_fd, remove wait_loop_output and wait_time
[ppp.git] / configure
1 #!/bin/sh
2 # $Id: configure,v 1.13 1997/04/30 05:39:02 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="ancient";;
18       1.1*)     state="known"; ksrc="netbsd-1.1";;
19       1.2*)     state="known"; ksrc="netbsd-1.2"; makext="netbsd-1.2";;
20       1.[3-9]*|[2-9]*)
21                 state="late"; ksrc="netbsd-1.2";;
22     esac;;
23   SunOS)
24     case $release in
25       [0-3]*)   state="ancient";;
26       4*)       state="known"; ksrc="sunos4"; makext="sunos4";;
27       5*)       state="known"; ksrc="svr4"; makext="sol2";;
28     esac;;
29   ULTRIX)
30     makext="ultrix";
31     case $release in
32       [0-3]*)   state="ancient";;
33       4.[01]*)  state="early"; ksrc="ultrix";;
34       4.[234])  state="known"; ksrc="ultrix";;
35     esac;;
36   OSF1)
37     makext="osf";
38     case $release in
39       V1.*)   state="ancient"; ksrc="osf1";;
40       V[23].*)  state="known"; ksrc="osf1";;
41       V[4-9]*) state="late"; ksrc="osf1";;
42     esac;;
43   Linux)
44     makext="linux";
45     ksrc="linux";
46     state="known";;
47   FreeBSD)
48     makext="bsd";
49     case $release in
50       1.*)      state="known"; ksrc="freebsd-old";;
51       2.[01]*)  state="known"; ksrc="freebsd-2.0";;
52       2.[2-9]*) state="late"; ksrc="freebsd-2.0";;
53     esac;;
54   NeXTStep)
55     makext="NeXT";
56     ksrc="NeXT";
57     state="known";;
58   SINIX-?)
59     case $release in
60       5.4[01]) state=known; ksrc=svr4; makext=svr4;;
61       5.4[2-9]) state=late; ksrc=svr4; makext=svr4;;
62     esac;;
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_SV|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 if [ -d "$ksrc" ]; then :; else
74   state="notincluded"
75   unset ksrc
76 fi
77
78 case $state in
79   ancient)
80     echo "This is an old release of a supported OS ($system)."
81     echo "This software cannot be used as-is on this system,"
82     echo "but you may be able to port it.  Good luck!"
83     exit;;
84   early)
85     echo "This is an old release of a supported OS ($system)."
86     echo "This software should install and run on this system,"
87     echo "but it hasn't been tested.";;
88   late)
89     echo "This is a newer release of $system than is supported by"
90     echo "this software.  It may or may not work.";;
91   unknown)
92     echo "This software has not been ported to this system.  Sorry.";;
93   notincluded)
94     echo "Support for this system has not been included"
95     echo "in this distribution.  Sorry.";;
96 esac
97
98 if [ -d "$ksrc" ]; then
99   echo "Creating links to Makefiles."
100   rm -f Makefile
101   ln -s $ksrc/Makefile.top Makefile
102   echo "  Makefile -> $ksrc/Makefile.top"
103   if [ $ksrc = svr4 ]; then
104     rm -f $ksrc/Makefile
105     ln -s Makefile.$makext $ksrc/Makefile
106     echo "  $ksrc/Makefile -> Makefile.$makext"
107   fi
108   for dir in pppd pppstats chat; do
109     rm -f $dir/Makefile
110     ln -s Makefile.$makext $dir/Makefile
111     echo "  $dir/Makefile -> Makefile.$makext"
112   done
113 fi