-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure
executable file
·217 lines (207 loc) · 5.76 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
#!/bin/sh
ETC_DIR=/etc/ax25
SBIN_DIR=/usr/sbin
BIN_DIR=/usr/bin
LIB_DIR=/usr/lib
MAN_DIR=/usr/share/man
VAR_DIR=/var/ax25
echo "Welcome to the configuration utility for Unode. This configure script"
echo "will very simply and easily guide you into installling Unode with as"
echo "very little trouble as possible. All you need to really do is simply"
echo "answer the following questions below properly. If you make a mistake"
echo "just break out of it (ctrl+c) and rerun ./configure. Let's get started!"
sleep 5
#echo "*** you need gcc-2.95 to build URONode ***"
#GCC=`which gcc-2.95`
#sleep 5
#if [[ -e "$GCC" ]]
# then
# echo "saw $GCC..."
# echo "GCC 2.95 found! Congratulations!!"
#else
# echo "gcc-2.95 not found! You need this now to build URONode."
# echo "You can get a copy of this at ftp://ftp.n1uro.net/pub/ax25/"
# exit 1
#fi
echo -n "Your machine architecture is ... "
sleep 1
ARCH=`uname -m`
echo $ARCH
sleep 1
echo -n "Checking for the existence of the Zlib headers... "
ZLIB=""
HAVEZLIB="#undef HAVE_ZLIB"
for zlibdir in /usr/include /usr/local/include
do
if [ -f $zlibdir/zlib.h ]
then
echo $zlibdir/zlib.h
ZLIB="-lz"
HAVEZLIB="#define HAVE_ZLIB 1"
fi
done
if [ -z "$ZLIB" ]
then
echo "not found."
echo " Without Zlib Node will lack compression support"
echo " See INSTALL for more information."
echo
fi
# Global protocol definition symbols for programmers that want to conditionally
# compile
HAVEAX25="#undef HAVE_AX25"
HAVEFLEX="#undef HAVE_FLEX"
FLEXNET=" "
IN="#"
HAVENETROM="#undef HAVE_NETROM"
HAVEROSE="#undef HAVE_ROSE"
HAVEMHEARD="#undef HAVE_MHEARD"
HAVETCPIP="#undef HAVE_TCPIP"
HAVEMOTD="#undef HAVE_MOTD"
MOTDPATH=
echo -n "Include support for the AX.25 protocol ? [Y/n]: "; read answer
if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ]
then
HAVEAX25="#define HAVE_AX25 1"
fi
#
echo -n "Include support for the FlexNet protocol ? [Y/n]: "; read answer
if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ]
then
HAVEAX25="#define HAVE_AX25 1"
HAVEFLEX="#define HAVE_FLEX 1"
FLEXNET="flexd"
IN=""
fi
#
echo -n "Include support for the NetRom protocol ? [Y/n]: "; read answer
if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ]
then
HAVEAX25="#define HAVE_AX25 1"
HAVENETROM="#define HAVE_NETROM 1"
fi
#
echo -n "Include support for the Rose protocol ? [Y/n]: "; read answer
if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ]
then
HAVEAX25="#define HAVE_AX25 1"
HAVEROSE="#define HAVE_ROSE 1"
fi
#
echo -n "Include support for MHeard ports listen ? [Y/n]: "; read answer
if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ]
then
HAVEAX25="#define HAVE_AX25 1"
HAVEMHEARD="#define HAVE_MHEARD 1"
fi
#
echo -n "Include support for TCP/IP functions ? [Y/n]: "; read answer
if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ]
then
HAVETCPIP="#define HAVE_TCPIP 1"
fi
#
echo -n "Display a MOTD at login? [y/N]: "; read answer
if [ "$answer" = "Y" -o "$answer" = "y" ]
then
HAVEMOTD="#define HAVEMOTD"
MOTDPATH='"/etc/ax25/unode.motd"'
fi
#
echo "Creating Makefile"
sed -e "s~@FLEXNET@~$FLEXNET~g; \
s~@IN@~$IN~g" <Makefile.in > Makefile
echo "Creating Makefile.include"
sed -e "s~@ARCH@~$ARCH~g; \
s~@ETC_DIR@~$ETC_DIR~g; \
s~@LIB_DIR@~$LIB_DIR~g; \
s~@SBIN_DIR@~$SBIN_DIR~g; \
s~@BIN_DIR@~$BIN_DIR~g; \
s~@VAR_DIR@~$VAR_DIR~g; \
s~@MAN_DIR@~$MAN_DIR~g; \
s~@ZLIB@~$ZLIB~g" <Makefile.include.in >Makefile.include
echo "Creating config.h"
sed -e "s~@ETC_DIR@~$ETC_DIR~g; \
s~@LIB_DIR@~$LIB_DIR~g; \
s~@SBIN_DIR@~$SBIN_DIR~g; \
s~@BIN_DIR@~$BIN_DIR~g; \
s~@VAR_DIR@~$VAR_DIR~g; \
s~@MAN_DIR@~$MAN_DIR~g; \
s~@HAVEAX25@~$HAVEAX25~g; \
s~@HAVEFLEX@~$HAVEFLEX~g; \
s~@HAVENETROM@~$HAVENETROM~g; \
s~@HAVEROSE@~$HAVEROSE~g; \
s~@HAVEMHEARD@~$HAVEMHEARD~g; \
s~@HAVETCPIP@~$HAVETCPIP~g; \
s~@HAVEMOTD@~$HAVEMOTD~g; \
s~@MOTDPATH@~$MOTDPATH~g; \
s~@HAVEZLIB@~$HAVEZLIB~g" <config.h.in >config.h
echo "Creating dependancy files..."
make depend > /dev/null 2>&1
echo "Configuration successful!!"
sleep 2
echo "about the authors..."
sleep 3
echo "Unode is a combined effort of years worth of work. Those who's code"
echo "is included in this flavor of a linux based node are:"
sleep 1
echo "Brian Rogers N1URO <[email protected]> (current maintainer)"
sleep 1
echo "Stefano Noferi IZ5AWZ <[email protected]>"
sleep 1
echo "Tomi Manninen OH2BNS <[email protected]>"
sleep 1
echo "Alan Cox GW4PTS <[email protected]>"
sleep 1
echo "Roy PE1RJA <[email protected]>"
echo ""
sleep 1
echo "Special thanks to Morgan, sm6tky for his security report"
sleep 1
echo ""
echo -n "Shall I run the make command for you ? [Y/n]: "; read answer
if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ]
then
echo "Making Unode! Please be patient."
sleep 1
echo "compile errors will be in make.debug."
echo ""
sleep 1
echo "You may not see anything until the process is complete..."
make > make.debug
echo "let's check for binary errors..."
sleep 1
echo -n "nodeusers: "
sleep 2
if [ -x ./nodeusers ]; then
echo "SUCCESS!"
else
echo "FAILED!"
fi
sleep 1
echo -n "unode: "
sleep 2
if [ -x ./unode ]; then
echo "SUCCESS!"
else
echo "FAILED!"
fi
sleep 1
echo -n "flexd: "
sleep 2
if [ -x ./flexd ]; then
echo "SUCCESS!"
else
echo "FAILED! - perhaps you didn't want flexnet?"
echo "This is not an error if you chose NO to flexnet."
echo "This only means the flexnet daemon binary was not found."
echo ""
echo "Process complete!"
echo ""
fi
sleep 2
echo "Check the file make.debug if you had errors."
echo "If no errors, type: make install or make upgrade"
echo "and edit your files in /etc/ax25/"
fi
exit 0