-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·45 lines (36 loc) · 1.48 KB
/
Copy pathconfigure
File metadata and controls
executable file
·45 lines (36 loc) · 1.48 KB
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
#!/bin/sh
#********************************************************************************
@make clean 2>/dev/null
# check for existing qmail installation
[ -f conf-build ] && . ./conf-build
[ -f ../find-qmaildir ] && . ../find-qmaildir || echo "$QMAILDIR" > conf-home
[ ! -f `head -1 conf-home`/bin/qmail-smtpd ] && \
echo "Couldn't find valid *qmail installation, check 'conf-build'!" && exit 1
# check qlibs directory
[ -f conf-build ] && . ./conf-build
[ "$QLIBDIR" ] && echo "$QLIBDIR" > conf-qlibs
#********************************************************************************
cp Makefile.in Makefile.in.tmp
OS=`uname -s | tr 'A-Z' 'a-z'`
echo "Checking system ... "${OS}" found!"
if [ $OS ] && [ $OS == "linux" ] ; then
echo "Add -lresolv to linker flags ... done!"
sed s}'LFLAGS ='}'LFLAGS = -lresolv'}g Makefile.in.tmp > Makefile.tmp
fi
mv Makefile.tmp Makefile.in.tmp
VERS="VERSION="`head -1 VERSION.lib`
echo "Set library version string ... "`head -1 VERSION.lib`
sed s}^VERSION.*$}$VERS}g Makefile.in.tmp > Makefile.tmp
mv Makefile.tmp Makefile.in.tmp
sed s}QLIBDIR}`head -1 conf-qlibs`}g Makefile.in.tmp > Makefile.tmp
mv Makefile.tmp Makefile
rm Makefile.in.tmp
#********************************************************************************
# check for system tools (required)
for f in bash hostname [ test make perl awk fmt
do
echo -n "Checking for $f ... "
which $f 2>/dev/null
if [ $? -ne 0 ] ; then echo "not found!" ; exit 1 ; fi
done
echo "Done! Now run make."