mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Mac: update build.sh to hack around autotools problem
For reasons I cannot explain, running configure for libdivecomputer claims that certain feature tests pass, even though those features demonstrably aren't there. This is happening for two compiler warning flags (-Wrestrict & -Wno-unused-but-set-variable) as well as the test for clock_gettime. To work around this, we manually edit the config.h file and the created Makefile before building libdivecomputer. This happened on macOS 10.11.6 with clang-800.0.42.1 (part of Xcode 8.2.1). Tangentially related to: See #1263 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2408134014
commit
387aee4cdf
1 changed files with 10 additions and 0 deletions
|
@ -362,6 +362,16 @@ if [ ! -f ../configure ] ; then
|
|||
autoreconf --install ..
|
||||
fi
|
||||
CFLAGS="$OLDER_MAC -I$INSTALL_ROOT/include $LIBDC_CFLAGS" ../configure --prefix=$INSTALL_ROOT --disable-examples
|
||||
if [ $PLATFORM = Darwin ] ; then
|
||||
# it seems that on my Mac some of the configure tests for libdivecomputer
|
||||
# pass even though the feature tested for is actually missing
|
||||
# let's hack around that
|
||||
sed -i .bak 's/^#define HAVE_CLOCK_GETTIME 1/\/* #undef HAVE_CLOCK_GETTIME *\//' config.h
|
||||
for i in $(find . -name Makefile)
|
||||
do
|
||||
sed -i .bak 's/-Wrestrict//;s/-Wno-unused-but-set-variable//' $i
|
||||
done
|
||||
fi
|
||||
make -j4
|
||||
make install
|
||||
|
||||
|
|
Loading…
Reference in a new issue