This repository has been archived by the owner on Jul 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure
executable file
·135 lines (118 loc) · 3.28 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
#!/bin/sh
VERSION="1.8"
DD_VERSION="delphinusdnsd-$VERSION"
DD_VERSION_LEN=`echo -n $DD_VERSION | wc -c`
NP=0
OPENWRT=0
echo "/* ddd-config.h - autogenerated by configure */" > ddd-config.h
until [ -z $1 ]
do
case $1 in
--location=*)
location=`echo $1 | sed -e 's/--location=//g'`
echo "#define DEFAULT_LOCATION \"$location\"" >> ddd-config.h
echo "#define DEFAULT_CONFFILE \"${location}/etc/delphinusdns.conf\"" >> ddd-config.h
echo "#define DEFAULT_RZONE_DIR \"${location}/replicant\"" >> ddd-config.h
;;
--nosign)
echo "#define DDD_NOSIGN 1 /* signing disabled */" >> ddd-config.h
;;
--openwrt)
OPENWRT=1
;;
--user=*)
user=`echo $1 | sed -e 's/--user=//g'`
echo "#define DEFAULT_PRIVILEGE \"$user\"" >> ddd-config.h
;;
--without-setproctitle)
echo "#define NO_SETPROCTITLE 1" >> ddd-config.h
;;
*)
echo "usage: configure [--user=USERNAME] [--without-setproctitle] [--location=LOCATION]"
exit
;;
esac
shift
done
echo "#define DD_CONVERT_VERSION \"dd-convert $VERSION\"" >> ddd-config.h
echo "#define DD_VERSION \"$DD_VERSION\"" >> ddd-config.h
echo "#define DD_VERSION_LEN $DD_VERSION_LEN" >> ddd-config.h
openbsd() {
echo configuring for OpenBSD
cp Makefile.openbsd Makefile
cp delphinusdnsd/Makefile.openbsd delphinusdnsd/Makefile
cp dddctl/Makefile.openbsd dddctl/Makefile
}
netbsd() {
echo configuring for NetBSD
if [ ! -d /usr/pkg/libressl ]; then
echo must install libressl in pkgsrc. 1>&2
exit 1
fi
cp Makefile.netbsd Makefile
cp delphinusdnsd/Makefile.netbsd delphinusdnsd/Makefile
cp dddctl/Makefile.netbsd dddctl/Makefile
mkdir -p delphinusdnsd/openbsd-compat
mkdir -p dddctl/openbsd-compat
if [ ! -d /usr/local/bin ] ; then
echo WARN: before installing make sure /usr/local/bin exists!
fi
if [ ! -d /usr/local/sbin ] ; then
echo WARN: before installing make sure /usr/local/sbin exists!
fi
if [ ! -d /usr/local/man/man/man8 ] ; then
echo WARN: before installing make sure /usr/local/man/man/man8 exists!
fi
if [ ! -d /usr/local/man/man/man5 ] ; then
echo WARN: before installing make sure /usr/local/man/man/man5 exists!
fi
if [ ! -d /usr/local/man/man/html8 ] ; then
echo WARN: before installing make sure /usr/local/man/man/html8 exists!
fi
if [ ! -d /usr/local/man/man/html5 ] ; then
echo WARN: before installing make sure /usr/local/man/man/html5 exists!
fi
}
freebsd() {
echo configuring for FreeBSD
cp Makefile.freebsd Makefile
cp delphinusdnsd/Makefile.freebsd delphinusdnsd/Makefile
cp dddctl/Makefile.freebsd dddctl/Makefile
mkdir -p delphinusdnsd/openbsd-compat
mkdir -p dddctl/openbsd-compat
}
linux() {
if [ $OPENWRT -gt 0 ] ; then
echo configuring for OpenWRT
cp Makefile.openwrt Makefile
else
echo configuring for Linux
cp Makefile.linux Makefile
echo "#define DDD_PAGE_SIZE `getconf PAGE_SIZE`" >> ddd-config.h
fi
echo If your system needs libressl a rudamentary way of building it is
echo made available to you by typing 'make libressl-portable'. Please
echo study the Makefile.linux in libressl directory to continue with
echo this, FIRST.
}
darwin() {
echo unfortunately mac os x has been disabled
}
case "`uname -s`" in
Darwin)
darwin
;;
OpenBSD)
openbsd
;;
FreeBSD)
freebsd
;;
NetBSD)
netbsd
;;
Linux)
linux
;;
esac
echo done. Type make to make programs.