Skip to content

Commit b676f38

Browse files
committed
depends: allow for CONFIG_SITE to be used rather than stealing prefix
This does not break any existing prefix behavior, only makes new behavior work. For example: CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure --prefix=/
1 parent 22e0b35 commit b676f38

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

depends/config.site.in

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1+
depends_prefix="`dirname ${ac_site_file}`/.."
2+
13
cross_compiling=maybe
24
host_alias=@HOST@
35
ac_tool_prefix=${host_alias}-
46

57
if test -z $with_boost; then
6-
with_boost=$prefix
8+
with_boost=$depends_prefix
79
fi
810
if test -z $with_qt_plugindir; then
9-
with_qt_plugindir=$prefix/plugins
11+
with_qt_plugindir=$depends_prefix/plugins
1012
fi
1113
if test -z $with_qt_translationdir; then
12-
with_qt_translationdir=$prefix/translations
14+
with_qt_translationdir=$depends_prefix/translations
1315
fi
1416
if test -z $with_qt_bindir; then
15-
with_qt_bindir=$prefix/native/bin
17+
with_qt_bindir=$depends_prefix/native/bin
1618
fi
1719
if test -z $with_protoc_bindir; then
18-
with_protoc_bindir=$prefix/native/bin
20+
with_protoc_bindir=$depends_prefix/native/bin
1921
fi
2022
if test -z $with_comparison_tool; then
21-
with_comparison_tool=$prefix/native/share/BitcoindComparisonTool_jar/BitcoindComparisonTool.jar
23+
with_comparison_tool=$depends_prefix/native/share/BitcoindComparisonTool_jar/BitcoindComparisonTool.jar
2224
fi
2325

2426

@@ -41,32 +43,32 @@ fi
4143

4244
if test x@host_os@ = xmingw32; then
4345
if test -z $with_qt_incdir; then
44-
with_qt_incdir=$prefix/include
46+
with_qt_incdir=$depends_prefix/include
4547
fi
4648
if test -z $with_qt_libdir; then
47-
with_qt_libdir=$prefix/lib
49+
with_qt_libdir=$depends_prefix/lib
4850
fi
4951
fi
5052

51-
PATH=$prefix/native/bin:$PATH
53+
PATH=$depends_prefix/native/bin:$PATH
5254
PKG_CONFIG="`which pkg-config` --static"
5355

5456
# These two need to remain exported because pkg-config does not see them
5557
# otherwise. That means they must be unexported at the end of configure.ac to
5658
# avoid ruining the cache. Sigh.
5759

58-
export PKG_CONFIG_LIBDIR=$prefix/lib/pkgconfig
59-
export PKG_CONFIG_PATH=$prefix/share/pkgconfig
60+
export PKG_CONFIG_LIBDIR=$depends_prefix/lib/pkgconfig
61+
export PKG_CONFIG_PATH=$depends_prefix/share/pkgconfig
6062

61-
CPPFLAGS="-I$prefix/include/ $CPPFLAGS"
62-
LDFLAGS="-L$prefix/lib $LDFLAGS"
63+
CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS"
64+
LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
6365

6466
CC="@CC@"
6567
CXX="@CXX@"
6668
OBJC="${CC}"
6769
OBJCXX="${CXX}"
68-
CCACHE=$prefix/native/bin/ccache
69-
PYTHONPATH=$prefix/native/lib/python/dist-packages:$PYTHONPATH
70+
CCACHE=$depends_prefix/native/bin/ccache
71+
PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$PYTHONPATH
7072

7173
if test -n "@AR@"; then
7274
AR=@AR@

0 commit comments

Comments
 (0)