forked from parcio/julea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.sh
executable file
·83 lines (65 loc) · 2 KB
/
configure.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
#!/bin/bash
# JULEA - Flexible storage framework
# Copyright (C) 2017 Michael Kuhn
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set -e
SELF_PATH="$(readlink --canonicalize-existing -- "$0")"
SELF_DIR="${SELF_PATH%/*}"
SELF_BASE="${SELF_PATH##*/}"
. "${SELF_DIR}/scripts/common"
spack_init ()
{
local modules_dir
local spack_dir
local spack_env
spack_dir="$(get_directory "${SELF_DIR}/dependencies")"
spack_env="${spack_dir}/share/spack/setup-env.sh"
test -n "${spack_dir}" || return 1
test -d "${spack_dir}" || return 1
test -f "${spack_env}" || return 1
if ! command -v module > /dev/null 2>&1
then
modules_dir="$("${spack_dir}/bin/spack" location --install-dir environment-modules)"
if test -f "${modules_dir}/Modules/init/bash"
then
. "${modules_dir}/Modules/init/bash"
elif test -f '/etc/profile.d/modules.sh'
then
. /etc/profile.d/modules.sh
fi
fi
. "${spack_env}"
}
spack_load ()
{
local spack_pkg
spack_pkg="$1"
test -n "${spack_pkg}" || return 1
spack load --dependencies "${spack_pkg}"
}
if spack_init
then
for pkg in glib libbson leveldb lmdb libmongoc otf sqlite
do
spack_load "${pkg}"
done
fi
# Do not filter out paths contained in CPATH and LIBRARY_PATH,
# otherwise ./waf will not work without having them set.
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS
export PKG_CONFIG_ALLOW_SYSTEM_LIBS
./waf configure "$@"