forked from openlink/odbc-bench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·147 lines (131 loc) · 3.25 KB
/
bootstrap.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
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
#! /bin/sh
#
# bootstrap.sh
#
# $Id$
#
# Generate Makefile.in and configure script for distribution
#
# odbc-bench - a TPC-A and TPC-C like benchmark program for databases
# Copyright (C) 2000-2018 OpenLink Software <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
DIE=0
#
# Check availability of build tools
#
echo "Checking build environment ..."
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed on your system."
echo
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed on your system."
echo
DIE=1
}
LIBTOOLIZE=
if test "x$LIBTOOLIZE" = "x"
then
(libtoolize --version) > /dev/null 2>&1 && LIBTOOLIZE=libtoolize
fi
if test "x$LIBTOOLIZE" = "x"
then
(glibtoolize --version) > /dev/null 2>&1 && LIBTOOLIZE=glibtoolize
fi
if test "x$LIBTOOLIZE" = "x"
then
echo
echo "**Error**: You must have \`libtool' installed on your system."
echo
DIE=1
fi
(gtk-config --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "*Warning*: You may need \`GTK' installed on your system."
echo
}
(xml2-config --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`xml2' installed on your system."
echo
DIE=1
}
if test "$DIE" -eq 1
then
echo
echo "Please read the README.CVS file for a list of packages you need"
echo "to install on your system before bootstrapping this project."
echo
echo "Bootstrap script aborting ..."
exit 1
fi
#
# Generate the build scripts
#
echo "Running $LIBTOOLIZE ..."
$LIBTOOLIZE --force --copy
if test $? -ne 0
then
echo
echo "Bootstrap script aborting ..."
exit 1
fi
echo "Running aclocal ..."
aclocal -I admin
if test $? -ne 0
then
echo
echo "Bootstrap script aborting ..."
exit 1
fi
echo "Running autoheader ..."
autoheader
if test $? -ne 0
then
echo
echo "Bootstrap script aborting ..."
exit 1
fi
echo "Running automake ..."
automake --add-missing --copy --include-deps
if test $? -ne 0
then
echo
echo "Bootstrap script aborting ..."
exit 1
fi
echo "Running autoconf ..."
autoconf
if test $? -ne 0
then
echo
echo "Bootstrap script aborting ..."
exit 1
fi
echo
echo "Please check the INSTALL and README files for instructions to"
echo "configure, build and install odbc-bench on your system."
echo
echo "Certain build targets are only enabled in maintainer mode:"
echo
echo " ./configure --enable-maintainer-mode ..."
echo
echo "Bootstrap script completed successfully."
exit 0