summaryrefslogtreecommitdiffstats
path: root/src/djvulibre.mk
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2016-04-10 14:41:40 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2016-04-10 16:21:43 (GMT)
commitefff981373b928c0dfc728fcf9c3c69541590353 (patch)
tree227830226fb5994dca0ee2f913872b76c6be77ee /src/djvulibre.mk
parentcbbb43b7d44ea0fbe2d8efd03d741c6d20bb931b (diff)
downloadmxe-efff981373b928c0dfc728fcf9c3c69541590353.zip
mxe-efff981373b928c0dfc728fcf9c3c69541590353.tar.gz
mxe-efff981373b928c0dfc728fcf9c3c69541590353.tar.bz2
djvulibre: enable shared targets
Patch "fix linking errors in shared builds" fixes i686-w64-mingw32.shared. Change of djvulibre.mk fixes x86_64-w64-mingw32.shared by changing deplibs check method to "objdump". See the explanations below. On Wheezy (at least) "file" returns "data" for x86-64 object files from libmsvcp60.a. Therefore the check fails with the following message: *** Warning: linker path does not have real file for library -lmsvcp60. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have *** because I did check the linker path looking for a file starting *** with libmsvcp60 and none of the candidates passed a file format test *** using a file magic. Last file checked: /home/mxe/mxe-djvulibre/usr/lib/gcc/x86_64-w64-mingw32.shared/4.9.3/../../../../x86_64-w64-mingw32.shared/lib//libmsvcp60.a *** The inter-library dependencies that have been dropped here will be *** automatically added whenever a program is linked with this library *** or is declared to -dlopen it. *** Since this library must not contain undefined symbols, *** because either the platform does not support them or *** it was explicitly requested with -no-undefined, *** libtool will only create a static version of it. Then it compiled static library and failed when compiling djvulibre-test.c because of missing -ljpeg.
Diffstat (limited to 'src/djvulibre.mk')
-rw-r--r--src/djvulibre.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/djvulibre.mk b/src/djvulibre.mk
index 8827123..3e4e09a 100644
--- a/src/djvulibre.mk
+++ b/src/djvulibre.mk
@@ -20,7 +20,10 @@ endef
define $(PKG)_BUILD
cd '$(1)' && CPPFLAGS='-DDLL_EXPORT' ./configure \
$(MXE_CONFIGURE_OPTS) \
- --disable-desktopfiles
+ --disable-desktopfiles \
+ $(if $(BUILD_SHARED),\
+ lt_cv_deplibs_check_method='file_magic file format (pe-i386|pe-x86-64)' \
+ lt_cv_file_magic_cmd='$$OBJDUMP -f')
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)/libdjvu' -j 1 install-lib \
install-include install-pkgconfig
@@ -30,6 +33,3 @@ define $(PKG)_BUILD
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
`'$(TARGET)-pkg-config' ddjvuapi --libs`
endef
-
-$(PKG)_BUILD_SHARED =
-