summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-09-16 08:44:53 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-09-16 08:44:53 +0000
commit90daa0d361b7f0fd853ba6d950acc04442909a53 (patch)
tree75c82ffaa70e5d94a483be8b952e92cdf5c2b82e /include
parent33b3594332924b15015a036b5e9b64982d5f15d1 (diff)
downloadmtk-20170518-90daa0d361b7f0fd853ba6d950acc04442909a53.zip
mtk-20170518-90daa0d361b7f0fd853ba6d950acc04442909a53.tar.gz
mtk-20170518-90daa0d361b7f0fd853ba6d950acc04442909a53.tar.bz2
prereq-build: test for static zlib availability
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 46976
Diffstat (limited to 'include')
-rw-r--r--include/prereq-build.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 211201a..f5fb9e2 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -60,10 +60,16 @@ $(eval $(call TestHostCommand,ncurses, \
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses))
+ifeq ($(HOST_OS),Linux)
+ zlib_link_flags := -Wl,-Bstatic -lz -Wl,-Bdynamic
+else
+ zlib_link_flags := -lz
+endif
+
$(eval $(call TestHostCommand,zlib, \
- Please install zlib. (Missing libz.so or zlib.h), \
+ Please install a static zlib. (Missing libz.a or zlib.h), \
echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \
- gcc -include zlib.h -x c -o $(TMP_DIR)/a.out - -lz))
+ gcc -include zlib.h -x c -o $(TMP_DIR)/a.out - $(zlib_link_flags)))
$(eval $(call TestHostCommand,libssl, \
Please install the openssl library (with development headers), \