forked from tomtom-international/cpp-dependencies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·28 lines (23 loc) · 1.3 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
#!/bin/sh
# Copyright (C) 2012-2016. TomTom International BV (http://tomtom.com).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
echo "Configuring..."
echo "int main() {}" >.test_compiler.cpp
g++ -o .test_compiler .test_compiler.cpp || (echo "No functioning compiler \"g++\" found! Aborting."; exit 1)
./.test_compiler || (echo "Compiler does not generate functioning executables. Aborting."; exit 1)
rm .test_compiler.cpp .test_compiler
echo "#include <boost/filesystem.hpp>\nint main() { boost::filesystem::path p; }" >.test_boost.cpp
g++ -o .test_boost .test_boost.cpp -lboost_system -lboost_filesystem || (echo "Boost filesystem could not be used. Please verify your installation."; exit 1)
rm .test_boost .test_boost.cpp
echo "Configuring complete. Please run \"make\" to compile and \"sudo make install\" to install."