-
Notifications
You must be signed in to change notification settings - Fork 548
/
configure
executable file
·119 lines (110 loc) · 1.96 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/sh
echo '---------------------------------------------------------------------'
echo 'SoftEther VPN for Unix'
echo
echo 'Copyright (c) Daiyuu Nobori.'
echo 'Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.'
echo 'Copyright (c) SoftEther Corporation.'
echo 'Copyright (c) all contributors on SoftEther VPN project in GitHub.'
echo
echo 'License: The Apache License, Version 2.0'
echo
echo 'Read and understand README.TXT, LICENSE.TXT and WARNING.TXT before use.'
echo '---------------------------------------------------------------------'
echo
echo 'Welcome to the corner-cutting configure script !'
echo
OS=""
case "`uname -s`" in
Linux)
OS="linux"
;;
FreeBSD)
OS="freebsd"
;;
SunOS)
OS="solaris"
;;
Darwin)
OS="macos"
;;
OpenBSD)
OS="openbsd"
;;
*)
echo 'Select your operating system below:'
echo ' 1: Linux'
echo ' 2: FreeBSD'
echo ' 3: Solaris'
echo ' 4: Mac OS X'
echo ' 5: OpenBSD'
echo
echo -n 'Which is your operating system (1 - 5) ? : '
read TMP
echo
if test "$TMP" = "1"
then
OS="linux"
fi
if test "$TMP" = "2"
then
OS="freebsd"
fi
if test "$TMP" = "3"
then
OS="solaris"
fi
if test "$TMP" = "4"
then
OS="macos"
fi
if test "$TMP" = "5"
then
OS="openbsd"
fi
if test "$OS" = ""
then
echo "Wrong number."
exit 1
fi
;;
esac
NOBITS=""
case "`uname -m`" in
aarch*|arm*|arm*)
NOBITS="_nobits"
;;
esac
CPU=""
case "`uname -m`" in
x86_64|amd64|aarch64|arm64|armv8*|mips64|ppc64|sparc64|alpha|ia64)
CPU=64bit
;;
i?86|x86pc|i86pc|armv4*|armv5*|armv6*|armv7*)
CPU=32bit
;;
*)
echo 'Select your CPU bits below:'
echo ' 1: 32-bit'
echo ' 2: 64-bit'
echo
echo -n 'Which is the type of your CPU (1 - 2) ? : '
read TMP
echo
if test "$TMP" = "1"
then
CPU="32bit"
fi
if test "$TMP" = "2"
then
CPU="64bit"
fi
if test "$CPU" = ""
then
echo "Wrong number."
exit 1
fi
;;
esac
cp src/makefiles/${OS}_${CPU}${NOBITS}.mak Makefile
echo "The Makefile is generated. Run 'make' to build SoftEther VPN."