forked from EnterpriseDB/hdfs_fdw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautogen.sh
executable file
·59 lines (50 loc) · 1.27 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
#! /bin/bash
#-------------------------------------------------------------------------
#
# autogen.sh
# Foreign-data wrapper for remote Hadoop/Hive servers
#
# Portions Copyright (c) 2004-2015, EnterpriseDB Corporation.
#
# IDENTIFICATION
# autogen.sh
#
#-------------------------------------------------------------------------
if [ "$#" -ne 1 ]; then
echo "Usage: autogen.sh thrift-install-dir"
exit
fi
# Download and install thrift
function configure_thrift
{
rm -rf thrift-0.9.2.tar.gz
wget http://mirrors.gigenet.com/apache/thrift/0.9.2/thrift-0.9.2.tar.gz
tar -zxvf thrift-0.9.2.tar.gz
cd thrift-0.9.2
export CXXFLAGS="-fPIC"
./configure --prefix=$1 -with-qt4=no --with-c_glib=no --with-csharp=no --with-java=no --with-erlang=no --with-nodejs=no --with-lua=no --with-python=no --with-perl=no --with-php=no --with-php_extension=no --with-ruby=no --with-haskell=no --with-go=no --with-d=no
make
make install
cd ..
}
# Install thrift's fb303
function configure_fb303
{
cd thrift-0.9.2/contrib/fb303
export CXXFLAGS="-fPIC"
./bootstrap.sh
./configure --prefix=$1
make
make install
cd ../../../
}
# Compile and install libhive
function configure_libhive
{
cd libhive
make
make install
}
configure_thrift
configure_fb303
configure_libhive