aboutsummaryrefslogtreecommitdiffstats
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
commit3a75e11fa6212409d3d70f9c38f91946459a65ac (patch)
treec05882893ee8cac099bf433af8ed54642c7bf2c2
parent59e9bad641228deaae52a2485fbf766a04f1fa30 (diff)
downloadmaster-187ad058-3a75e11fa6212409d3d70f9c38f91946459a65ac.tar.gz
master-187ad058-3a75e11fa6212409d3d70f9c38f91946459a65ac.tar.bz2
master-187ad058-3a75e11fa6212409d3d70f9c38f91946459a65ac.zip
prereq-build: test for static zlib availability
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46976 3c298f89-4303-0410-b956-a3cf2f4a3e73
-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 211201af3d..f5fb9e270a 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), \