-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathautogen.sh
executable file
·69 lines (62 loc) · 1.66 KB
/
autogen.sh
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
#!/bin/sh
#Comment out first
#sudo cp /usr/local/lib/libIP2Location.so.1 /usr/lib/x86_64-linux-gnu/
#sudo cp /usr/local/lib/libIP2Location.so /usr/lib/x86_64-linux-gnu/
#Check if the IP2Location C Library is been installed or not
if [ -e /usr/local/lib/libIP2Location.so ]
then
echo "Detected IP2Location C Library."
else
cat >&2 <<'EOF'
IP2Location C Library is not installed in your system. Please get a copy from https://github.com/chrislim2888/IP2Location-C-Library and follow the instructions in readme file to install first before installing IP2Location Varnish Library
EOF
exit 1
fi
warn() {
echo "WARNING: $@" 1>&2
}
case `uname -s` in
Darwin)
LIBTOOLIZE=glibtoolize
;;
FreeBSD)
LIBTOOLIZE=libtoolize
;;
Linux)
LIBTOOLIZE=libtoolize
;;
SunOS)
LIBTOOLIZE=libtoolize
;;
*)
warn "unrecognized platform:" `uname -s`
LIBTOOLIZE=libtoolize
esac
automake_version=`automake --version | tr ' ' '\n' | egrep '^[0-9]\.[0-9a-z.-]+'`
if [ -z "$automake_version" ] ; then
warn "unable to determine automake version"
else
case $automake_version in
0.*|1.[0-8]|1.[0-8][.-]*)
warn "automake ($automake_version) detected; 1.9 or newer recommended"
;;
*)
;;
esac
fi
# check for varnishapi.m4 in custom paths
dataroot=$(pkg-config --variable=datarootdir varnishapi 2>/dev/null)
if [ -z "$dataroot" ] ; then
cat >&2 <<'EOF'
Package varnishapi was not found in the pkg-config search path.
Perhaps you should add the directory containing `varnishapi.pc'
to the PKG_CONFIG_PATH environment variable
EOF
exit 1
fi
set -ex
$LIBTOOLIZE --copy --force
aclocal -I m4 -I ${dataroot}/aclocal
autoheader
automake --add-missing --copy --foreign
autoconf