Revert "I suspect that we unlikely to use JRE older than 1.3.1_07"
[LibreOffice.git] / RepositoryExternal.mk
blobe79c9393828b2ee23397aec4773c02ea9589198e
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 # this file describes all the external libraries
21 # depending on the configure options these may be taken from the system,
22 # or the internal/bundled copy may be built.
24 # for every external, a function gb_LinkTarget__use_FOO is defined,
25 # once for the system case, once for the internal case.
27 # in the system case, no libraries should be registered, but the target-local
28 # variable LIBS should be set to FOO_LIBS, and INCLUDES to FOO_CFLAGS.
31 ifeq ($(CPUNAME),X86_64)
32 wnt_arch_subdir_optional=x64/
33 wnt_arch_subdir_mandatory=x64
34 else ifeq ($(CPUNAME),INTEL)
35 wnt_arch_subdir_mandatory=Win32
36 endif
38 # External headers
40 ifneq ($(SYSTEM_ODBC_HEADERS),)
42 define gb_LinkTarget__use_odbc_headers
43 $(call gb_LinkTarget_add_defs,$(1),\
44 -DSYSTEM_ODBC_HEADERS \
47 endef
49 else # !SYSTEM_ODBC_HEADERS
51 define gb_LinkTarget__use_odbc_headers
52 $(call gb_LinkTarget_set_include,$(1),\
53 -I$(SRCDIR)/external/unixODBC/inc \
54 $$(INCLUDE) \
57 endef
59 endif # SYSTEM_ODBC_HEADERS
61 ifneq ($(SYSTEM_MDDS),)
63 gb_ExternalProject__use_mdds_headers :=
65 define gb_LinkTarget__use_mdds_headers
66 $(call gb_LinkTarget_set_include,$(1),\
67 $(MDDS_CFLAGS) \
68 $$(INCLUDE) \
71 endef
73 else # !SYSTEM_MDDS
75 define gb_ExternalProject__use_mdds_headers
76 $(call gb_ExternalProject_use_unpacked,$(1),mdds)
78 endef
80 define gb_LinkTarget__use_mdds_headers
81 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
82 $(call gb_LinkTarget_set_include,$(1),\
83 $(MDDS_CFLAGS) \
84 $$(INCLUDE) \
87 endef
89 endif # SYSTEM_MDDS
91 ifneq ($(SYSTEM_GLM),)
93 define gb_LinkTarget__use_glm_headers
94 $(call gb_LinkTarget_add_defs,$(1),\
95 -DGLM_FORCE_CTOR_INIT \
98 endef
100 gb_ExternalProject__use_glm_headers :=
102 else
104 define gb_LinkTarget__use_glm_headers
105 $(call gb_LinkTarget_add_defs,$(1),\
106 -DGLM_FORCE_CTOR_INIT \
108 $(call gb_LinkTarget_use_unpacked,$(1),glm)
109 $(call gb_LinkTarget_set_include,$(1),\
110 $(GLM_CFLAGS) \
111 $$(INCLUDE) \
114 endef
116 define gb_ExternalProject__use_glm_headers
117 $(call gb_ExternalProject_use_unpacked,$(1),glm)
119 endef
121 endif
123 ifneq ($(ENABLE_SKIA),)
124 define gb_LinkTarget__use_skia
125 $(call gb_LinkTarget_set_include,$(1),\
126 -I$(call gb_UnpackedTarball_get_dir,skia)/include/core \
127 -I$(call gb_UnpackedTarball_get_dir,skia)/include/effects \
128 -I$(call gb_UnpackedTarball_get_dir,skia)/include/gpu \
129 -I$(call gb_UnpackedTarball_get_dir,skia)/include/config \
130 -I$(call gb_UnpackedTarball_get_dir,skia)/include/ports \
131 -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan \
132 -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \
133 -I$(call gb_UnpackedTarball_get_dir,skia) \
134 -I$(SRCDIR)/external/skia/inc/ \
135 $$(INCLUDE) \
137 $(call gb_LinkTarget_use_libraries,$(1),skia)
138 $(call gb_LinkTarget_add_defs,$(1),\
139 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
140 -DSKIA_DLL \
142 endef
143 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
144 skia \
146 endif
148 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
150 define gb_LinkTarget__use_sane_headers
151 $(call gb_LinkTarget_set_include,$(1),\
152 $(if $(filter WNT,$(OS)), \
153 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
154 -I$(SRCDIR)/external/sane/inc) \
155 $$(INCLUDE) \
158 ifeq ($(OS),WNT)
159 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
160 endif
162 endef
164 else
166 gb_LinkTarget__use_sane_headers :=
168 endif
170 ifneq ($(SYSTEM_BLUEZ),)
172 gb_LinkTarget__use_bluez_bluetooth_headers :=
174 else # !SYSTEM_BLUEZ
176 define gb_LinkTarget__use_bluez_bluetooth_headers
177 $(call gb_LinkTarget_set_include,$(1),\
178 -I$(SRCDIR)/external/bluez_bluetooth/inc \
179 $$(INCLUDE) \
182 endef
184 endif # SYSTEM_BLUEZ
186 # External libraries
188 ifneq ($(SYSTEM_CPPUNIT),)
190 define gb_LinkTarget__use_cppunit
191 $(call gb_LinkTarget_set_include,$(1),\
192 $$(INCLUDE) \
193 $(CPPUNIT_CFLAGS) \
196 $(call gb_LinkTarget_add_libs,$(1),\
197 $(CPPUNIT_LIBS) \
200 endef
202 else # !SYSTEM_CPPUNIT
204 define gb_LinkTarget__use_cppunit
205 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
207 $(call gb_LinkTarget_set_include,$(1),\
208 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
209 $$(INCLUDE) \
212 ifeq ($(COM),MSC)
213 $(call gb_LinkTarget_add_libs,$(1),\
214 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
216 else
217 $(call gb_LinkTarget_add_libs,$(1),\
218 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
220 endif
222 endef
224 endif # SYSTEM_CPPUNIT
226 ifneq ($(SYSTEM_EPOXY),)
228 define gb_LinkTarget__use_epoxy
229 $(call gb_LinkTarget_set_include,$(1),\
230 $$(INCLUDE) \
231 $(EPOXY_CFLAGS) \
233 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
235 endef
237 gb_ExternalProject__use_epoxy :=
239 else # !SYSTEM_EPOXY
241 define gb_LinkTarget__use_epoxy
242 $(call gb_LinkTarget_set_include,$(1),\
243 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
244 $$(INCLUDE) \
247 $(call gb_LinkTarget_use_libraries,$(1),\
248 epoxy \
251 endef
253 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
254 epoxy \
257 define gb_ExternalProject__use_epoxy
258 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
260 endef
262 endif # SYSTEM_EPOXY
264 define gb_LinkTarget__use_iconv
265 ifeq ($(COM),MSC)
266 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
267 else
268 $(call gb_LinkTarget_add_libs,$(1),-liconv)
269 endif
270 endef
272 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
274 define gb_LinkTarget__use_mariadb-connector-c
275 $(call gb_LinkTarget_set_include,$(1),\
276 $$(INCLUDE) \
277 $(MARIADB_CFLAGS) \
279 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
281 endef
282 gb_ExternalProject__use_mariadb-connector-c :=
284 else # !SYSTEM_MARIADB_CONNECTOR_C
286 define gb_LinkTarget__use_mariadb-connector-c
287 $(call gb_LinkTarget_set_include,$(1),\
288 $$(INCLUDE) \
289 $(MARIADB_CFLAGS) \
291 $(call gb_LinkTarget_use_static_libraries,$(1),\
292 mariadb-connector-c \
294 ifeq ($(OS),MACOSX)
295 $(call gb_LinkTarget_add_libs,$(1),\
296 -liconv \
298 endif
299 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
300 ws2_32 \
301 advapi32 \
302 kernel32 \
303 shlwapi \
304 crypt32 \
307 endef
308 define gb_ExternalProject__use_mariadb-connector-c
309 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
311 endef
313 endif # SYSTEM_MARIADB_CONNECTOR_C
316 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
318 define gb_LinkTarget__use_mysql
320 $(call gb_LinkTarget_add_defs,$(1),\
321 -DSYSTEM_MARIADB \
324 $(call gb_LinkTarget_add_libs,$(1),\
325 $(MARIADB_LIBS) \
328 $(call gb_LinkTarget_set_include,$(1),\
329 $(MARIADB_CFLAGS) \
330 $$(INCLUDE) \
332 endef
334 else
336 define gb_LinkTarget__use_mysql
338 $(call gb_LinkTarget_set_include,$(1),\
339 $$(INCLUDE) \
342 endef
344 endif
346 ifneq ($(SYSTEM_ZLIB),)
348 define gb_LinkTarget__use_zlib
349 $(call gb_LinkTarget_add_defs,$(1),\
350 -DSYSTEM_ZLIB \
352 $(call gb_LinkTarget_add_libs,$(1),-lz)
354 endef
356 # nothing on system
357 define gb_LinkTarget__use_zlib_x64
359 endef
361 gb_ExternalProject__use_zlib :=
363 else # !SYSTEM_ZLIB
365 define gb_LinkTarget__use_zlib_multiarch
366 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
368 $(call gb_LinkTarget_set_include,$(1),\
369 $(ZLIB_CFLAGS) \
370 $$(INCLUDE) \
373 $(call gb_LinkTarget_use_static_libraries,$(1),\
374 $(2) \
377 endef
379 define gb_LinkTarget__use_zlib
380 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
382 endef
384 define gb_LinkTarget__use_zlib_x64
385 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
387 endef
389 define gb_ExternalProject__use_zlib
390 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
392 endef
394 endif # SYSTEM_ZLIB
397 ifneq ($(SYSTEM_LIBJPEG),)
399 define gb_LinkTarget__use_libjpeg
400 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
401 $(call gb_LinkTarget_set_ldflags,$(1),\
402 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
405 endef
407 gb_ExternalProject__use_libjpeg :=
409 else
411 define gb_LinkTarget__use_libjpeg
412 $(call gb_LinkTarget_set_include,$(1),\
413 $(LIBJPEG_CFLAGS) \
414 $$(INCLUDE) \
416 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
417 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
419 endef
421 define gb_ExternalProject__use_libjpeg
422 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
424 endef
426 endif # SYSTEM_LIBJPEG
428 ifneq ($(SYSTEM_MYTHES),)
430 define gb_LinkTarget__use_mythes
431 $(call gb_LinkTarget_set_include,$(1),\
432 $$(INCLUDE) \
433 $(MYTHES_CFLAGS) \
435 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
437 endef
439 else # !SYSTEM_MYTHES
441 define gb_LinkTarget__use_mythes
442 $(call gb_LinkTarget_set_include,$(1),\
443 -I$(call gb_UnpackedTarball_get_dir,mythes) \
444 $$(INCLUDE) \
447 ifeq ($(COM),MSC)
448 $(call gb_LinkTarget_use_static_libraries,$(1),\
449 mythes \
451 else
452 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
453 $(call gb_LinkTarget_use_external_project,$(1),mythes)
454 endif
456 endef
458 endif # SYSTEM_MYTHES
461 ifneq ($(SYSTEM_EXPAT),)
463 define gb_LinkTarget__use_expat_impl
464 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
466 $(call gb_LinkTarget_add_defs,$(1),\
467 -DSYSTEM_EXPAT \
470 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
472 endef
474 gb_ExternalProject__use_expat :=
476 else # !SYSTEM_EXPAT
478 define gb_LinkTarget__use_expat_impl
479 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
481 $(call gb_LinkTarget_set_include,$(1),\
482 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
483 $$(INCLUDE) \
486 $(call gb_LinkTarget_use_static_libraries,$(1),\
487 $(2) \
490 endef
492 define gb_ExternalProject__use_expat
493 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
495 endef
497 endif # SYSTEM_EXPAT
499 define gb_LinkTarget__use_expat
500 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
502 endef
504 define gb_LinkTarget__use_expat_x64
505 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
507 endef
509 ifneq ($(SYSTEM_HYPH),)
511 define gb_LinkTarget__use_hyphen
512 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
514 endef
516 else # !SYSTEM_HYPH
518 define gb_LinkTarget__use_hyphen
519 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
520 $(call gb_LinkTarget_set_include,$(1),\
521 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
522 $$(INCLUDE) \
525 ifeq ($(COM),MSC)
526 $(call gb_LinkTarget_use_static_libraries,$(1),\
527 hyphen \
529 else
530 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
531 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
532 endif
534 endef
536 endif # SYSTEM_HYPH
538 ifneq ($(SYSTEM_HUNSPELL),)
540 define gb_LinkTarget__use_hunspell
541 $(call gb_LinkTarget_set_include,$(1),\
542 $$(INCLUDE) \
543 $(HUNSPELL_CFLAGS) \
545 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
547 endef
549 gb_ExternalProject__use_hunspell :=
551 else # !SYSTEM_HUNSPELL
553 define gb_LinkTarget__use_hunspell
554 $(call gb_LinkTarget_add_defs,$(1),\
555 -DHUNSPELL_STATIC \
557 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
558 $(call gb_LinkTarget_set_include,$(1),\
559 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
560 $$(INCLUDE) \
563 ifeq ($(COM),MSC)
564 $(call gb_LinkTarget_use_static_libraries,$(1),\
565 hunspell \
567 else
568 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
569 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
570 endif
572 endef
574 define gb_ExternalProject__use_hunspell
575 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
577 endef
579 endif # SYSTEM_HUNSPELL
582 ifneq ($(SYSTEM_BOOST),)
584 define gb_LinkTarget__use_boost_lib
585 $(call gb_LinkTarget_set_include,$(1),\
586 $$(INCLUDE) \
587 $(BOOST_CPPFLAGS) \
590 $(call gb_LinkTarget_add_ldflags,$(1),\
591 $(BOOST_LDFLAGS) \
594 $(call gb_LinkTarget_add_libs,$(1),$(2))
596 endef
598 define gb_LinkTarget__use_boost_locale
599 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
601 endef
603 define gb_LinkTarget__use_boost_date_time
604 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
606 endef
608 define gb_LinkTarget__use_boost_filesystem
609 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
611 endef
613 gb_ExternalProject__use_boost_filesystem :=
615 define gb_LinkTarget__use_boost_iostreams
616 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
618 endef
620 gb_ExternalProject__use_boost_iostreams :=
622 define gb_LinkTarget__use_boost_system
623 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
625 endef
627 gb_ExternalProject__use_boost_system :=
629 define gb_LinkTarget__use_boost_headers
630 $(call gb_LinkTarget_set_include,$(1),\
631 $$(INCLUDE) \
632 $(BOOST_CPPFLAGS) \
635 endef
637 gb_ExternalProject__use_boost_headers:=
639 else # !SYSTEM_BOOST
641 define gb_LinkTarget__use_boost_lib
642 $(call gb_LinkTarget_add_defs,$(1),\
643 -DBOOST_ALL_NO_LIB \
646 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
648 endef
650 define gb_LinkTarget__use_boost_locale
651 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
652 $(call gb_LinkTarget_add_libs,$(1),\
653 $(if $(filter $(OS),MACOSX),-liconv) \
656 endef
658 define gb_LinkTarget__use_boost_date_time
659 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
661 endef
663 define gb_LinkTarget__use_boost_filesystem
664 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
666 endef
668 define gb_ExternalProject__use_boost_filesystem
669 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
670 endef
672 define gb_LinkTarget__use_boost_iostreams
673 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
675 endef
677 define gb_ExternalProject__use_boost_iostreams
678 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
679 endef
681 define gb_LinkTarget__use_boost_system
682 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
684 endef
686 define gb_ExternalProject__use_boost_system
687 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
688 endef
690 define gb_LinkTarget__use_boost_headers
691 $(call gb_LinkTarget_use_unpacked,$(1),boost)
692 $(call gb_LinkTarget_set_include,$(1),\
693 $(BOOST_CPPFLAGS) \
694 $$(INCLUDE) \
697 endef
699 define gb_ExternalProject__use_boost_headers
700 $(call gb_ExternalProject_use_unpacked,$(1),boost)
702 endef
704 endif # SYSTEM_BOOST
707 ifneq ($(SYSTEM_LIBCMIS),)
709 define gb_LinkTarget__use_libcmis
710 $(call gb_LinkTarget_set_include,$(1),\
711 $$(INCLUDE) \
712 $(LIBCMIS_CFLAGS) \
714 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
716 endef
718 else # !SYSTEM_LIBCMIS
720 define gb_LinkTarget__use_libcmis
721 $(call gb_LinkTarget_set_include,$(1),\
722 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
723 $$(INCLUDE) \
725 $(call gb_LinkTarget_use_static_libraries,$(1),\
726 libcmis \
729 endef
731 endif # SYSTEM_LIBCMIS
733 ifeq ($(ENABLE_JAVA),TRUE)
735 define gb_LinkTarget__use_jawt
736 $(call gb_LinkTarget_add_libs,$(1),\
737 $(JAWTLIB) \
740 endef
742 else # !ENABLE_JAVA
744 gb_LinkTarget__use_jawt :=
746 endif # ENABLE_JAVA
748 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
750 define gb_LinkTarget__use_libatomic_ops
751 $(call gb_LinkTarget_set_include,$(1),\
752 $$(INCLUDE) \
753 $(LIBATOMIC_OPS_CFLAGS) \
755 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
757 endef
758 gb_ExternalProject__use_libatomic_ops :=
760 else # !SYSTEM_LIBATOMIC_OPS
762 define gb_LinkTarget__use_libatomic_ops
763 $(call gb_LinkTarget_set_include,$(1),\
764 $(LIBATOMIC_OPS_CFLAGS) \
765 $$(INCLUDE) \
766 $(LIBATOMIC_OPS_CFLAGS) \
768 $(call gb_LinkTarget_use_external_project,$(1),\
769 libatomic_ops \
772 $(call gb_LinkTarget_add_libs,$(1),\
773 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
776 endef
778 define gb_ExternalProject__use_libatomic_ops
779 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
781 endef
783 endif # SYSTEM_LIBATOMIC_OPS
786 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
788 define gb_LinkTarget__use_libexttextcat
789 $(call gb_LinkTarget_set_include,$(1),\
790 $$(INCLUDE) \
791 $(LIBEXTTEXTCAT_CFLAGS) \
793 $(call gb_LinkTarget_add_defs,$(1),\
794 -DSYSTEM_LIBEXTTEXTCAT \
796 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
798 endef
800 else # !SYSTEM_LIBEXTTEXTCAT
802 define gb_LinkTarget__use_libexttextcat
803 $(call gb_LinkTarget_set_include,$(1),\
804 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
805 $$(INCLUDE) \
808 ifeq ($(COM),MSC)
809 $(call gb_LinkTarget_use_static_libraries,$(1),\
810 libexttextcat \
812 else
813 $(call gb_LinkTarget_add_libs,$(1),\
814 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
816 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
817 endif
820 endef
822 endif # SYSTEM_LIBEXTTEXTCAT
825 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
827 define gb_LinkTarget__use_libnumbertext
828 $(call gb_LinkTarget_set_include,$(1),\
829 $$(INCLUDE) \
830 $(LIBNUMBERTEXT_CFLAGS) \
832 $(call gb_LinkTarget_add_defs,$(1),\
833 -DSYSTEM_LIBNUMBERTEXT \
835 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
837 endef
839 else # !SYSTEM_LIBNUMBERTEXT
841 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
842 libnumbertext_numbertext \
845 define gb_LinkTarget__use_libnumbertext
846 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
847 $(call gb_LinkTarget_set_include,$(1),\
848 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
849 $$(INCLUDE) \
852 ifeq ($(COM),MSC)
853 $(call gb_LinkTarget_use_static_libraries,$(1),\
854 libnumbertext \
856 else
858 $(call gb_LinkTarget_add_libs,$(1),\
859 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
861 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
863 endif
865 endef
867 endif # SYSTEM_LIBNUMBERTEXT
870 ifneq ($(SYSTEM_LIBXML),)
872 define gb_LinkTarget__use_libxml2
873 $(call gb_LinkTarget_add_defs,$(1),\
874 -DSYSTEM_LIBXML \
876 $(call gb_LinkTarget_set_include,$(1),\
877 $$(INCLUDE) \
878 $(LIBXML_CFLAGS) \
880 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
882 endef
883 gb_ExternalProject__use_libxml2:=
885 else # !SYSTEM_LIBXML
887 $(eval $(call gb_Helper_register_packages_for_install,ure,\
888 libxml2 \
891 define gb_LinkTarget__use_libxml2
892 $(call gb_LinkTarget_use_package,$(1),libxml2)
893 $(call gb_LinkTarget_set_include,$(1),\
894 $$(INCLUDE) \
895 $(LIBXML_CFLAGS) \
898 $(call gb_LinkTarget_add_libs,$(1),\
899 $(LIBXML_LIBS) \
902 ifeq ($(COM),MSC)
903 $(call gb_LinkTarget_use_external,$(1),icu_headers)
904 endif
906 endef
907 define gb_ExternalProject__use_libxml2
908 $(call gb_ExternalProject_use_package,$(1),libxml2)
910 ifeq ($(COM),MSC)
911 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
912 endif
914 endef
916 endif # SYSTEM_LIBXML
919 ifneq ($(SYSTEM_LIBXSLT),)
921 define gb_LinkTarget__use_libxslt
922 $(call gb_LinkTarget_set_include,$(1),\
923 $$(INCLUDE) \
924 $(LIBXSLT_CFLAGS) \
926 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
928 endef
930 define gb_LinkTarget__use_libexslt
931 $(call gb_LinkTarget_set_include,$(1),\
932 $$(INCLUDE) \
933 $(LIBEXSLT_CFLAGS) \
936 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
938 endef
940 else # !SYSTEM_LIBXSLT
942 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
943 libxslt \
946 define gb_LinkTarget__use_libxslt
947 $(call gb_LinkTarget_use_package,$(1),libxslt)
948 $(call gb_LinkTarget_set_include,$(1),\
949 $$(INCLUDE) \
950 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
953 ifeq ($(COM),MSC)
954 $(call gb_LinkTarget_add_libs,$(1),\
955 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
957 else
958 $(call gb_LinkTarget_add_libs,$(1),\
959 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
961 endif
963 endef
965 define gb_LinkTarget__use_libexslt
966 $(call gb_LinkTarget_use_package,$(1),libxslt)
967 $(call gb_LinkTarget_set_include,$(1),\
968 $$(INCLUDE) \
969 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
972 ifeq ($(COM),MSC)
973 $(call gb_LinkTarget_add_libs,$(1),\
974 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
976 else
977 $(call gb_LinkTarget_add_libs,$(1),\
978 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
980 endif
982 endef
984 endif # SYSTEM_LIBXSLT
987 ifneq ($(SYSTEM_XMLSEC),)
989 define gb_LinkTarget__use_xmlsec
990 $(call gb_LinkTarget_add_defs,$(1),\
991 -DSYSTEM_XMLSEC \
993 $(call gb_LinkTarget_set_include,$(1),\
994 $$(INCLUDE) \
995 $(XMLSEC_CFLAGS) \
997 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
999 endef
1001 gb_ExternalProject__use_xmlsec:=
1003 else # !SYSTEM_XMLSEC
1005 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1006 xmlsec \
1009 define gb_LinkTarget__use_xmlsec
1011 endef
1013 endif # SYSTEM_XMLSEC
1015 ifneq ($(SYSTEM_LIBLANGTAG),)
1017 define gb_LinkTarget__use_liblangtag
1018 $(call gb_LinkTarget_set_include,$(1),\
1019 $$(INCLUDE) \
1020 $(LIBLANGTAG_CFLAGS) \
1023 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1025 endef
1027 gb_ExternalProject__use_liblangtag :=
1029 else # !SYSTEM_LIBLANGTAG
1031 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1032 liblangtag_data \
1035 ifeq ($(COM),MSC)
1037 define gb_LinkTarget__use_liblangtag
1038 $(call gb_LinkTarget_set_include,$(1),\
1039 $(LIBLANGTAG_CFLAGS) \
1040 $$(INCLUDE) \
1042 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1043 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1045 endef
1047 else
1049 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1050 liblangtag \
1053 define gb_LinkTarget__use_liblangtag
1054 $(call gb_LinkTarget_set_include,$(1),\
1055 $(LIBLANGTAG_CFLAGS) \
1056 $$(INCLUDE) \
1058 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1059 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1061 endef
1063 endif # MSC
1065 define gb_ExternalProject__use_liblangtag
1066 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1068 endef
1070 endif # SYSTEM_LIBLANGTAG
1073 gb_ExternalProject__use_apr :=
1075 ifeq ($(WITH_WEBDAV),serf)
1077 define gb_LinkTarget__use_apr
1078 $(call gb_LinkTarget_set_include,$(1),\
1079 $$(INCLUDE) \
1080 $(APR_CFLAGS) \
1082 $(call gb_LinkTarget_add_libs,$(1),\
1083 $(APR_LIBS) \
1084 $(if $(filter $(OS),LINUX),-lpthread) \
1085 $(if $(filter $(OS),MACOSX),-liconv) \
1088 ifeq ($(SYSTEM_APR),)
1089 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1090 mswsock \
1091 rpcrt4 \
1092 shell32 \
1094 $(call gb_LinkTarget_add_defs,$(1),\
1095 -DAPR_DECLARE_STATIC \
1096 -DAPU_DECLARE_STATIC \
1098 $(call gb_LinkTarget_use_external_project,$(1),apr_util,full)
1099 endif
1101 endef
1103 define gb_ExternalProject__use_apr
1104 ifeq ($(SYSTEM_APR),)
1105 $(call gb_ExternalProject_use_external_project,$(1),apr_util,full)
1106 endif
1108 endef
1110 ifneq ($(SYSTEM_SERF),)
1112 define gb_LinkTarget__use_serf
1113 $(call gb_LinkTarget_add_defs,$(1),\
1114 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS))) \
1117 $(call gb_LinkTarget_set_include,$(1),\
1118 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS)))) \
1119 $$(INCLUDE) \
1122 $(call gb_LinkTarget_add_libs,$(1),\
1123 $(SERF_LIBS) \
1126 endef
1128 else # !SYSTEM_SERF
1130 define gb_LinkTarget__use_serf
1131 $(call gb_LinkTarget_set_include,$(1),\
1132 -I$(call gb_UnpackedTarball_get_dir,serf) \
1133 $$(INCLUDE) \
1136 $(call gb_LinkTarget_use_static_libraries,$(1),\
1137 serf \
1140 endef
1142 endif # SYSTEM_SERF
1144 else ifeq ($(WITH_WEBDAV),neon)
1146 ifneq ($(SYSTEM_NEON),)
1148 define gb_LinkTarget__use_neon
1149 $(call gb_LinkTarget_add_defs,$(1),\
1150 -DNEON_VERSION=0x$(NEON_VERSION) \
1151 -DSYSTEM_NEON \
1153 $(call gb_LinkTarget_set_include,$(1),\
1154 $$(INCLUDE) \
1155 $(NEON_CFLAGS) \
1158 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1160 endef
1162 else # !SYSTEM_NEON
1164 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1165 neon \
1168 define gb_LinkTarget__use_neon
1169 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1170 $(call gb_LinkTarget_set_include,$(1),\
1171 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1172 $$(INCLUDE) \
1174 $(call gb_LinkTarget_use_libraries,$(1),\
1175 neon \
1178 endef
1180 endif # SYSTEM_NEON
1182 endif # WITH_WEBDAV
1184 ifneq ($(SYSTEM_REDLAND),)
1186 define gb_LinkTarget__use_librdf
1187 $(call gb_LinkTarget_add_defs,$(1),\
1188 -DSYSTEM_REDLAND \
1190 $(call gb_LinkTarget_set_include,$(1),\
1191 $$(INCLUDE) \
1192 $(REDLAND_CFLAGS) \
1194 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1196 endef
1198 gb_LinkTarget__use_redland_headers:=
1200 gb_LinkTarget__use_raptor_headers:=
1202 gb_LinkTarget__use_rasqal_headers:=
1204 else # !SYSTEM_REDLAND
1206 define gb_LinkTarget__use_redland_headers
1207 $(call gb_LinkTarget_set_include,$(1),\
1208 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1209 $$(INCLUDE) \
1212 endef
1214 define gb_LinkTarget__use_raptor_headers
1215 $(call gb_LinkTarget_set_include,$(1),\
1216 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1217 $$(INCLUDE) \
1220 endef
1222 define gb_LinkTarget__use_rasqal_headers
1223 $(call gb_LinkTarget_set_include,$(1),\
1224 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1225 $$(INCLUDE) \
1228 endef
1230 ifneq ($(OS),ANDROID)
1232 ifeq ($(COM),MSC)
1233 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1234 raptor2 \
1235 rasqal \
1236 rdf \
1238 else
1239 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1240 raptor \
1241 rasqal \
1242 redland \
1244 endif
1246 define gb_LinkTarget__use_librdf
1247 ifeq ($(COM),MSC)
1248 $(call gb_LinkTarget_use_libraries,$(1),\
1249 raptor2 \
1250 rdf \
1252 else
1253 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1255 $(call gb_LinkTarget_add_libs,$(1),\
1256 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1257 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1258 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1260 endif
1262 endef
1264 else # ANDROID
1266 define gb_LinkTarget__use_librdf
1267 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1269 endef
1271 endif # ANDROID
1273 endif # SYSTEM_REDLAND
1275 ifneq ($(SYSTEM_CAIRO),)
1277 define gb_LinkTarget__use_cairo
1278 $(call gb_LinkTarget_set_include,$(1),\
1279 $$(INCLUDE) \
1280 $(CAIRO_CFLAGS) \
1282 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1283 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1285 endef
1287 else # !SYSTEM_CAIRO
1289 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1291 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1292 cairo \
1293 pixman \
1296 define gb_LinkTarget__use_cairo
1297 $(call gb_LinkTarget_use_package,$(1),cairo)
1298 $(call gb_LinkTarget_use_package,$(1),pixman)
1299 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1300 $(call gb_LinkTarget_set_include,$(1),\
1301 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1302 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1303 -I$(call gb_UnpackedTarball_get_dir,pixman)/pixman \
1304 $$(INCLUDE) \
1306 $(call gb_LinkTarget_add_libs,$(1),\
1307 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1308 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1311 endef
1313 endif # !MACOSX, !WNT
1315 endif # !SYSTEM_CAIRO
1317 ifneq ($(SYSTEM_FREETYPE),)
1319 define gb_LinkTarget__use_freetype_headers
1320 $(call gb_LinkTarget_set_include,$(1),\
1321 $$(INCLUDE) \
1322 $(FREETYPE_CFLAGS) \
1325 endef
1327 gb_ExternalProject__use_freetype :=
1329 else
1331 define gb_LinkTarget__use_freetype_headers
1332 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1333 $(call gb_LinkTarget_set_include,$(1),\
1334 $(FREETYPE_CFLAGS) \
1335 $$(INCLUDE) \
1338 endef
1340 define gb_ExternalProject__use_freetype
1341 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1343 endef
1345 endif # SYSTEM_FREETYPE
1347 define gb_LinkTarget__use_freetype
1348 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1349 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1351 endef
1353 ifneq ($(SYSTEM_FONTCONFIG),)
1355 define gb_LinkTarget__use_fontconfig
1356 $(call gb_LinkTarget_set_include,$(1),\
1357 $$(INCLUDE) \
1358 $(FONTCONFIG_CFLAGS) \
1361 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1363 endef
1365 gb_ExternalProject__use_fontconfig :=
1367 else
1369 define gb_LinkTarget__use_fontconfig
1370 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1371 $(call gb_LinkTarget_set_include,$(1),\
1372 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1373 $$(INCLUDE) \
1376 $(call gb_LinkTarget_add_libs,$(1),\
1377 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1380 endef
1382 define gb_ExternalProject__use_fontconfig
1383 $(call gb_ExternalProject_use_external_project,$(1),fontconfig)
1385 endef
1387 endif # SYSTEM_FONTCONFIG
1389 ifneq ($(SYSTEM_GRAPHITE),)
1391 define gb_LinkTarget__use_graphite
1392 $(call gb_LinkTarget_set_include,$(1),\
1393 $$(INCLUDE) \
1394 $(GRAPHITE_CFLAGS) \
1396 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1398 endef
1400 gb_ExternalProject__use_graphite:=
1402 else # !SYSTEM_GRAPHITE
1404 define gb_LinkTarget__use_graphite
1405 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1406 $(call gb_LinkTarget_set_include,$(1),\
1407 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1408 $$(INCLUDE) \
1410 $(call gb_LinkTarget_use_static_libraries,$(1),\
1411 graphite \
1414 endef
1416 define gb_ExternalProject__use_graphite
1417 $(call gb_ExternalProject_use_static_libraries,$(1),\
1418 graphite \
1421 endef
1422 endif # SYSTEM_GRAPHITE
1424 ifneq ($(SYSTEM_ICU),)
1426 gb_LinkTarget__use_icu_headers:=
1427 gb_ExternalProject__use_icu:=
1429 define gb_LinkTarget__use_icudata
1430 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1432 endef
1433 define gb_LinkTarget__use_icui18n
1434 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1436 endef
1437 define gb_LinkTarget__use_icuuc
1438 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1440 endef
1442 else # !SYSTEM_ICU
1444 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1445 icu_ure \
1448 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1449 icu \
1452 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1453 gb_ICU_suffix:=lo
1454 else
1455 gb_ICU_suffix:=
1456 endif
1458 define gb_LinkTarget__use_icu_headers
1459 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1460 $(call gb_LinkTarget_set_include,$(1),\
1461 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1462 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1463 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1464 $$(INCLUDE) \
1467 endef
1469 define gb_ExternalProject__use_icu
1470 $(call gb_ExternalProject_use_package,$(1),icu)
1472 endef
1474 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1475 define gb_LinkTarget__use_icudata
1476 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1478 ifeq ($(OS),WNT)
1479 $(call gb_LinkTarget_add_libs,$(1),\
1480 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1482 else
1483 $(call gb_LinkTarget_add_libs,$(1),\
1484 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1486 endif
1488 endef
1490 define gb_LinkTarget__use_icui18n
1491 $(call gb_LinkTarget_use_package,$(1),icu)
1493 ifeq ($(OS),WNT)
1494 $(call gb_LinkTarget_add_libs,$(1),\
1495 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1497 else
1498 $(call gb_LinkTarget_add_libs,$(1),\
1499 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1501 endif
1503 endef
1505 define gb_LinkTarget__use_icuuc
1506 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1508 ifeq ($(OS),WNT)
1509 $(call gb_LinkTarget_add_libs,$(1),\
1510 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1512 else
1513 $(call gb_LinkTarget_add_libs,$(1),\
1514 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1516 endif
1518 endef
1520 endif # SYSTEM_ICU
1522 ifneq ($(SYSTEM_HARFBUZZ),)
1524 define gb_LinkTarget__use_harfbuzz
1525 $(call gb_LinkTarget_set_include,$(1),\
1526 $$(INCLUDE) \
1527 $(HARFBUZZ_CFLAGS) \
1529 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1531 endef
1533 gb_ExternalProject__use_harfbuzz :=
1535 else # SYSTEM_HARFBUZZ != TRUE
1537 define gb_LinkTarget__use_harfbuzz
1538 $(call gb_LinkTarget_set_include,$(1),\
1539 $(HARFBUZZ_CFLAGS) \
1540 $$(INCLUDE) \
1542 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1543 $(call gb_LinkTarget_use_external,$(1),icuuc)
1544 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1546 endef
1548 define gb_ExternalProject__use_harfbuzz
1549 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1551 endef
1553 endif # SYSTEM_HARFBUZZ
1555 ifneq ($(ENABLE_OPENSSL),TRUE)
1557 gb_ExternalProject__use_openssl:=
1558 gb_LinkTarget__use_openssl_headers:=
1559 gb_LinkTarget__use_openssl:=
1561 else # ENABLE_OPENSSL
1563 ifneq ($(SYSTEM_OPENSSL),)
1565 gb_LinkTarget__use_openssl_headers:=
1566 gb_ExternalProject__use_openssl:=
1568 define gb_LinkTarget__use_openssl
1569 $(call gb_LinkTarget_set_include,$(1),\
1570 $$(INCLUDE) \
1571 $(OPENSSL_CFLAGS) \
1573 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1575 endef
1577 else # !SYSTEM_OPENSSL
1579 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1580 openssl \
1583 define gb_ExternalProject__use_openssl
1584 $(call gb_ExternalProject_use_package,$(1),openssl)
1586 endef
1588 define gb_LinkTarget__use_openssl_headers
1589 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1590 $(call gb_LinkTarget_set_include,$(1),\
1591 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1592 $$(INCLUDE) \
1595 endef
1597 define gb_LinkTarget__use_openssl
1598 $(call gb_LinkTarget_use_package,$(1),openssl)
1599 ifeq ($(OS),WNT)
1600 $(call gb_LinkTarget_add_libs,$(1),\
1601 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1602 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1604 else
1605 $(call gb_LinkTarget_add_libs,$(1),\
1606 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1607 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1608 $(if $(filter $(OS),LINUX),-pthread) \
1610 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1611 ifeq ($(OS),SOLARIS)
1612 $(call gb_LinkTarget_add_libs,$(1),\
1613 -lnsl \
1614 -lsocket \
1616 endif
1617 endif
1619 endef
1621 endif # SYSTEM_OPENSSL
1622 endif # ENABLE_OPENSSL
1625 ifneq ($(ENABLE_OPENSSL),TRUE)
1627 define gb_LinkTarget__use_gnutls
1628 $(call gb_LinkTarget_set_include,$(1),\
1629 $$(INCLUDE) \
1630 $(GNUTLS_CFLAGS) \
1633 $(call gb_LinkTarget_add_defs,$(1),\
1634 -DDISABLE_OPENSSL \
1637 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1639 endef
1641 define gb_LinkTarget__use_libgcrypt
1642 $(call gb_LinkTarget_set_include,$(1),\
1643 $$(INCLUDE) \
1644 $(LIBGCRYPT_CFLAGS) \
1647 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1649 endef
1651 else # ENABLE_OPENSSL
1653 gb_LinkTarget__use_gnutls:=
1654 gb_LinkTarget__use_libgcrypt:=
1656 endif # ENABLE_OPENSSL
1659 ifneq ($(SYSTEM_CDR),)
1661 define gb_LinkTarget__use_cdr
1662 $(call gb_LinkTarget_set_include,$(1),\
1663 $$(INCLUDE) \
1664 $(CDR_CFLAGS) \
1666 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1668 endef
1670 else # !SYSTEM_CDR
1672 define gb_LinkTarget__use_cdr
1673 $(call gb_LinkTarget_set_include,$(1),\
1674 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1675 $$(INCLUDE) \
1677 $(call gb_LinkTarget_add_libs,$(1),\
1678 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1680 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1681 endef
1683 endif # SYSTEM_CDR
1686 ifneq ($(SYSTEM_EBOOK),)
1688 define gb_LinkTarget__use_ebook
1689 $(call gb_LinkTarget_set_include,$(1),\
1690 $$(INCLUDE) \
1691 $(EBOOK_CFLAGS) \
1693 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1695 endef
1697 gb_ExternalProject__use_ebook :=
1699 else # !SYSTEM_EBOOK
1701 define gb_LinkTarget__use_ebook
1702 $(call gb_LinkTarget_set_include,$(1),\
1703 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1704 $$(INCLUDE) \
1706 $(call gb_LinkTarget_add_libs,$(1),\
1707 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1709 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1711 endef
1713 define gb_ExternalProject__use_ebook
1714 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1716 endef
1718 endif # SYSTEM_EBOOK
1721 ifneq ($(SYSTEM_ETONYEK),)
1723 define gb_LinkTarget__use_etonyek
1724 $(call gb_LinkTarget_set_include,$(1),\
1725 $$(INCLUDE) \
1726 $(ETONYEK_CFLAGS) \
1728 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1730 endef
1732 gb_ExternalProject__use_etonyek :=
1734 else # !SYSTEM_ETONYEK
1736 ifeq ($(COM),MSC)
1738 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1739 etonyek \
1742 define gb_LinkTarget__use_etonyek
1743 $(call gb_LinkTarget_set_include,$(1),\
1744 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1745 $$(INCLUDE) \
1747 $(call gb_LinkTarget_use_libraries,$(1),\
1748 etonyek \
1751 endef
1753 else # !MSC
1755 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1756 libetonyek \
1759 define gb_LinkTarget__use_etonyek
1760 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1762 $(call gb_LinkTarget_set_include,$(1),\
1763 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1764 -DLIBETONYEK_VISIBILITY \
1765 $$(INCLUDE) \
1767 $(call gb_LinkTarget_add_libs,$(1),\
1768 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1770 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1772 endef
1774 define gb_ExternalProject__use_etonyek
1775 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1777 endef
1779 endif
1781 endif # SYSTEM_ETONYEK
1784 ifneq ($(SYSTEM_FREEHAND),)
1786 define gb_LinkTarget__use_freehand
1787 $(call gb_LinkTarget_set_include,$(1),\
1788 $$(INCLUDE) \
1789 $(FREEHAND_CFLAGS) \
1791 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1793 endef
1795 gb_ExternalProject__use_freehand :=
1797 else # !SYSTEM_FREEHAND
1799 define gb_LinkTarget__use_freehand
1800 $(call gb_LinkTarget_set_include,$(1),\
1801 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1802 $$(INCLUDE) \
1804 $(call gb_LinkTarget_add_libs,$(1),\
1805 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1807 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1809 endef
1811 define gb_ExternalProject__use_freehand
1812 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1814 endef
1816 endif # SYSTEM_FREEHAND
1819 ifneq ($(SYSTEM_ODFGEN),)
1821 define gb_LinkTarget__use_odfgen
1822 $(call gb_LinkTarget_set_include,$(1),\
1823 $$(INCLUDE) \
1824 $(ODFGEN_CFLAGS) \
1826 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1828 endef
1830 else # !SYSTEM_ODFGEN
1832 ifeq ($(COM),MSC)
1834 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1835 odfgen \
1838 define gb_LinkTarget__use_odfgen
1839 $(call gb_LinkTarget_set_include,$(1),\
1840 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1841 $$(INCLUDE) \
1843 $(call gb_LinkTarget_use_libraries,$(1),\
1844 odfgen \
1847 endef
1849 else # !MSC
1851 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1852 libodfgen \
1855 define gb_LinkTarget__use_odfgen
1856 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1858 $(call gb_LinkTarget_set_include,$(1),\
1859 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1860 -DLIBODFGEN_VISIBILITY \
1861 $$(INCLUDE) \
1863 $(call gb_LinkTarget_add_libs,$(1),\
1864 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1867 endef
1869 endif
1871 endif # SYSTEM_ODFGEN
1873 ifneq ($(SYSTEM_EPUBGEN),)
1875 define gb_LinkTarget__use_epubgen
1876 $(call gb_LinkTarget_set_include,$(1),\
1877 $$(INCLUDE) \
1878 $(EPUBGEN_CFLAGS) \
1880 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1882 endef
1883 gb_ExternalProject__use_epubgen :=
1885 else # !SYSTEM_EPUBGEN
1887 define gb_LinkTarget__use_epubgen
1888 $(call gb_LinkTarget_set_include,$(1),\
1889 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1890 $$(INCLUDE) \
1892 $(call gb_LinkTarget_add_libs,$(1),\
1893 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1895 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1897 endef
1898 define gb_ExternalProject__use_epubgen
1899 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1901 endef
1903 endif # SYSTEM_EPUBGEN
1905 ifneq ($(SYSTEM_REVENGE),)
1907 define gb_LinkTarget__use_revenge
1908 $(call gb_LinkTarget_set_include,$(1),\
1909 $$(INCLUDE) \
1910 $(REVENGE_CFLAGS) \
1912 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1914 endef
1916 gb_ExternalProject__use_revenge :=
1918 else # !SYSTEM_REVENGE
1920 ifeq ($(COM),MSC)
1922 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1923 revenge \
1926 define gb_LinkTarget__use_revenge
1927 $(call gb_LinkTarget_set_include,$(1),\
1928 $(REVENGE_CFLAGS) \
1929 $$(INCLUDE) \
1931 $(call gb_LinkTarget_use_libraries,$(1),\
1932 revenge \
1935 endef
1937 define gb_ExternalProject__use_revenge
1938 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1940 endef
1942 else # !MSC
1944 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1945 librevenge \
1948 define gb_LinkTarget__use_revenge
1949 $(call gb_LinkTarget_use_package,$(1),librevenge)
1951 $(call gb_LinkTarget_set_include,$(1),\
1952 $(REVENGE_CFLAGS) \
1953 -DLIBREVENGE_VISIBILITY \
1954 $$(INCLUDE) \
1956 $(call gb_LinkTarget_add_libs,$(1),\
1957 $(REVENGE_LIBS) \
1959 endef
1961 define gb_ExternalProject__use_revenge
1962 $(call gb_ExternalProject_use_package,$(1),librevenge)
1964 endef
1966 endif # MSC
1968 endif # SYSTEM_REVENGE
1971 ifneq ($(SYSTEM_ABW),)
1973 define gb_LinkTarget__use_abw
1974 $(call gb_LinkTarget_set_include,$(1),\
1975 $$(INCLUDE) \
1976 $(ABW_CFLAGS) \
1978 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1980 endef
1981 gb_ExternalProject__use_abw :=
1983 else # !SYSTEM_ABW
1985 define gb_LinkTarget__use_abw
1986 $(call gb_LinkTarget_set_include,$(1),\
1987 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1988 $$(INCLUDE) \
1990 $(call gb_LinkTarget_add_libs,$(1),\
1991 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1993 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1995 endef
1996 define gb_ExternalProject__use_abw
1997 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1999 endef
2001 endif # SYSTEM_ABW
2004 ifneq ($(SYSTEM_MSPUB),)
2006 define gb_LinkTarget__use_mspub
2007 $(call gb_LinkTarget_set_include,$(1),\
2008 $$(INCLUDE) \
2009 $(MSPUB_CFLAGS) \
2011 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2013 endef
2015 else # !SYSTEM_MSPUB
2017 define gb_LinkTarget__use_mspub
2018 $(call gb_LinkTarget_set_include,$(1),\
2019 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2020 $$(INCLUDE) \
2022 $(call gb_LinkTarget_add_libs,$(1),\
2023 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2025 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2027 endef
2029 endif # SYSTEM_MSPUB
2032 ifneq ($(SYSTEM_PAGEMAKER),)
2034 define gb_LinkTarget__use_pagemaker
2035 $(call gb_LinkTarget_set_include,$(1),\
2036 $$(INCLUDE) \
2037 $(PAGEMAKER_CFLAGS) \
2039 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2041 endef
2042 gb_ExternalProject__use_pagemaker :=
2044 else # !SYSTEM_PAGEMAKER
2046 define gb_LinkTarget__use_pagemaker
2047 $(call gb_LinkTarget_set_include,$(1),\
2048 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2049 $$(INCLUDE) \
2051 $(call gb_LinkTarget_add_libs,$(1),\
2052 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2054 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2056 endef
2057 define gb_ExternalProject__use_pagemaker
2058 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2060 endef
2062 endif # SYSTEM_PAGEMAKER
2065 ifneq ($(SYSTEM_QXP),)
2067 define gb_LinkTarget__use_qxp
2068 $(call gb_LinkTarget_set_include,$(1),\
2069 $$(INCLUDE) \
2070 $(QXP_CFLAGS) \
2072 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2074 endef
2075 gb_ExternalProject__use_qxp :=
2077 else # !SYSTEM_QXP
2079 define gb_LinkTarget__use_qxp
2080 $(call gb_LinkTarget_set_include,$(1),\
2081 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2082 $$(INCLUDE) \
2084 $(call gb_LinkTarget_add_libs,$(1),\
2085 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2087 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2089 endef
2090 define gb_ExternalProject__use_qxp
2091 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2093 endef
2095 endif # SYSTEM_QXP
2098 ifneq ($(SYSTEM_ZMF),)
2100 define gb_LinkTarget__use_zmf
2101 $(call gb_LinkTarget_set_include,$(1),\
2102 $$(INCLUDE) \
2103 $(ZMF_CFLAGS) \
2105 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2107 endef
2108 gb_ExternalProject__use_zmf :=
2110 else # !SYSTEM_ZMF
2112 define gb_LinkTarget__use_zmf
2113 $(call gb_LinkTarget_set_include,$(1),\
2114 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2115 $$(INCLUDE) \
2117 $(call gb_LinkTarget_add_libs,$(1),\
2118 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2120 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2122 endef
2123 define gb_ExternalProject__use_zmf
2124 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2126 endef
2128 endif # SYSTEM_ZMF
2131 ifneq ($(SYSTEM_VISIO),)
2133 define gb_LinkTarget__use_visio
2134 $(call gb_LinkTarget_set_include,$(1),\
2135 $$(INCLUDE) \
2136 $(VISIO_CFLAGS) \
2138 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2140 endef
2142 else # !SYSTEM_VISIO
2144 define gb_LinkTarget__use_visio
2145 $(call gb_LinkTarget_set_include,$(1),\
2146 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2147 $$(INCLUDE) \
2149 $(call gb_LinkTarget_add_libs,$(1),\
2150 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2152 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2154 endef
2156 endif # SYSTEM_VISIO
2159 ifneq ($(SYSTEM_WPD),)
2161 define gb_LinkTarget__use_wpd
2162 $(call gb_LinkTarget_set_include,$(1),\
2163 $$(INCLUDE) \
2164 $(WPD_CFLAGS) \
2166 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2168 endef
2169 gb_ExternalProject__use_wpd :=
2171 else # !SYSTEM_WPD
2173 ifeq ($(COM),MSC)
2175 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2176 wpd \
2179 define gb_LinkTarget__use_wpd
2180 $(call gb_LinkTarget_set_include,$(1),\
2181 $(WPD_CFLAGS) \
2182 $$(INCLUDE) \
2184 $(call gb_LinkTarget_use_libraries,$(1),\
2185 wpd \
2188 endef
2190 define gb_ExternalProject__use_wpd
2191 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2193 endef
2195 else # !MSC
2197 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2198 libwpd \
2201 define gb_LinkTarget__use_wpd
2202 $(call gb_LinkTarget_use_package,$(1),libwpd)
2204 $(call gb_LinkTarget_set_include,$(1),\
2205 $(WPD_CFLAGS) \
2206 $$(INCLUDE) \
2208 $(call gb_LinkTarget_add_libs,$(1),\
2209 $(WPD_LIBS) \
2212 endef
2214 define gb_ExternalProject__use_wpd
2215 $(call gb_ExternalProject_use_package,$(1),libwpd)
2217 endef
2219 endif # MSC
2221 endif # SYSTEM_WPD
2224 ifneq ($(SYSTEM_WPG),)
2226 define gb_LinkTarget__use_wpg
2227 $(call gb_LinkTarget_set_include,$(1),\
2228 $$(INCLUDE) \
2229 $(WPG_CFLAGS) \
2231 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2233 endef
2234 gb_ExternalProject__use_wpg :=
2236 else # !SYSTEM_WPG
2238 ifeq ($(COM),MSC)
2240 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2241 wpg \
2244 define gb_LinkTarget__use_wpg
2245 $(call gb_LinkTarget_set_include,$(1),\
2246 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2247 $$(INCLUDE) \
2249 $(call gb_LinkTarget_use_libraries,$(1),\
2250 wpg \
2253 endef
2255 else # !MSC
2257 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2258 libwpg \
2261 define gb_LinkTarget__use_wpg
2262 $(call gb_LinkTarget_use_package,$(1),libwpg)
2264 $(call gb_LinkTarget_set_include,$(1),\
2265 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2266 $$(INCLUDE) \
2268 $(call gb_LinkTarget_add_libs,$(1),\
2269 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2272 endef
2274 endif # MSC
2276 endif # SYSTEM_WPG
2279 ifneq ($(SYSTEM_WPS),)
2281 define gb_LinkTarget__use_wps
2282 $(call gb_LinkTarget_set_include,$(1),\
2283 $$(INCLUDE) \
2284 $(WPS_CFLAGS) \
2286 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2288 endef
2289 gb_ExternalProject__use_wps :=
2291 else # !SYSTEM_WPS
2293 ifeq ($(COM),MSC)
2295 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2296 wps \
2299 define gb_LinkTarget__use_wps
2300 $(call gb_LinkTarget_set_include,$(1),\
2301 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2302 $$(INCLUDE) \
2305 $(call gb_LinkTarget_use_libraries,$(1),\
2306 wps \
2309 endef
2311 else # !MSC
2313 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2314 libwps \
2317 define gb_LinkTarget__use_wps
2318 $(call gb_LinkTarget_use_package,$(1),libwps)
2320 $(call gb_LinkTarget_set_include,$(1),\
2321 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2322 $$(INCLUDE) \
2324 $(call gb_LinkTarget_add_libs,$(1),\
2325 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2328 endef
2330 endif # MSC
2332 endif # SYSTEM_WPS
2335 ifneq ($(SYSTEM_MWAW),)
2337 define gb_LinkTarget__use_mwaw
2338 $(call gb_LinkTarget_set_include,$(1),\
2339 $$(INCLUDE) \
2340 $(MWAW_CFLAGS) \
2342 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2344 endef
2346 else # !SYSTEM_MWAW
2348 ifeq ($(COM),MSC)
2350 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2351 mwaw \
2354 define gb_LinkTarget__use_mwaw
2355 $(call gb_LinkTarget_set_include,$(1),\
2356 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2357 $$(INCLUDE) \
2360 $(call gb_LinkTarget_use_libraries,$(1),\
2361 mwaw \
2364 endef
2366 else # !MSC
2368 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2369 libmwaw \
2372 define gb_LinkTarget__use_mwaw
2373 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2375 $(call gb_LinkTarget_set_include,$(1),\
2376 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2377 $$(INCLUDE) \
2379 $(call gb_LinkTarget_add_libs,$(1),\
2380 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2383 endef
2385 endif # MSC
2387 endif # SYSTEM_MWAW
2389 ifneq ($(SYSTEM_STAROFFICE),)
2391 define gb_LinkTarget__use_staroffice
2392 $(call gb_LinkTarget_set_include,$(1),\
2393 $$(INCLUDE) \
2394 $(STAROFFICE_CFLAGS) \
2396 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2398 endef
2400 else # !SYSTEM_STAROFFICE
2402 ifeq ($(COM),MSC)
2404 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2405 staroffice \
2408 define gb_LinkTarget__use_staroffice
2409 $(call gb_LinkTarget_set_include,$(1),\
2410 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2411 $$(INCLUDE) \
2414 $(call gb_LinkTarget_use_libraries,$(1),\
2415 staroffice \
2418 endef
2420 else # !MSC
2422 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2423 libstaroffice \
2426 define gb_LinkTarget__use_staroffice
2427 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2429 $(call gb_LinkTarget_set_include,$(1),\
2430 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2431 $$(INCLUDE) \
2433 $(call gb_LinkTarget_add_libs,$(1),\
2434 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2437 endef
2439 endif # MSC
2441 endif # SYSTEM_STAROFFICE
2444 ifneq ($(SYSTEM_LCMS2),)
2446 define gb_LinkTarget__use_lcms2
2447 $(call gb_LinkTarget_set_include,$(1),\
2448 $$(INCLUDE) \
2449 $(LCMS2_CFLAGS) \
2451 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2453 endef
2455 gb_ExternalProject__use_lcms2 :=
2457 else # !SYSTEM_LCMS2
2459 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2460 lcms2 \
2463 define gb_ExternalProject__use_lcms2
2464 $(call gb_ExternalProject_use_package,$(1),lcms2)
2466 endef
2468 ifeq ($(OS),ANDROID)
2470 define gb_LinkTarget__use_lcms2
2471 $(call gb_LinkTarget_use_package,$(1),lcms2)
2472 $(call gb_LinkTarget_set_include,$(1),\
2473 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2474 $$(INCLUDE) \
2477 endef
2479 else
2481 define gb_LinkTarget__use_lcms2
2482 $(call gb_LinkTarget_use_package,$(1),lcms2)
2483 $(call gb_LinkTarget_set_include,$(1),\
2484 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2485 $$(INCLUDE) \
2487 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2489 endef
2491 endif # ANDROID
2492 endif # SYSTEM_LCMS2
2494 ifneq ($(ENABLE_LPSOLVE),)
2496 ifneq ($(SYSTEM_LPSOLVE),)
2498 define gb_LinkTarget__use_lpsolve
2499 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2500 $(call gb_LinkTarget_add_defs,$(1),\
2501 -DSYSTEM_LPSOLVE \
2504 endef
2506 else # !SYSTEM_LPSOLVE
2508 define gb_LinkTarget__use_lpsolve
2509 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2510 ifeq ($(COM),MSC)
2511 $(call gb_LinkTarget_add_libs,$(1),\
2512 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2514 else
2515 $(call gb_LinkTarget_add_libs,$(1),\
2516 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2518 endif
2519 $(call gb_LinkTarget_set_include,$(1),\
2520 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2521 $$(INCLUDE) \
2524 endef
2526 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2527 lpsolve \
2530 endif # SYSTEM_LPSOLVE
2532 else
2534 gb_LinkTarget__use_lpsolve :=
2536 endif # ENABLE_LPSOLVE
2538 ifneq ($(ENABLE_COINMP),)
2540 ifneq ($(SYSTEM_COINMP),TRUE)
2542 define gb_LinkTarget__use_coinmp
2543 $(call gb_LinkTarget_use_package,$(1),coinmp)
2544 ifeq ($(COM),MSC)
2545 $(call gb_LinkTarget_add_libs,$(1),\
2546 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2548 else
2549 $(call gb_LinkTarget_add_libs,$(1),\
2550 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2551 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2552 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2553 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2554 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2555 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2556 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2558 endif
2559 $(call gb_LinkTarget_set_include,$(1),\
2560 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2561 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2562 $$(INCLUDE) \
2565 endef
2567 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2568 coinmp \
2571 else # SYSTEM_COINMP
2573 define gb_LinkTarget__use_coinmp
2574 $(call gb_LinkTarget_set_include,$(1),\
2575 $$(INCLUDE) \
2576 $(COINMP_CFLAGS) \
2578 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2580 endef
2582 endif
2584 else
2586 gb_LinkTarget__use_coinmp :=
2588 endif # ENABLE_COINMP
2590 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2592 define gb_LinkTarget__use_mDNSResponder
2593 $(call gb_LinkTarget_set_include,$(1),\
2594 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2595 $$(INCLUDE) \
2597 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2598 endef
2600 endif # MDNSRESPONDER
2602 ifeq ($(ENABLE_GIO),TRUE)
2604 define gb_LinkTarget__use_gio
2605 $(call gb_LinkTarget_set_include,$(1),\
2606 $$(INCLUDE) \
2607 $(GIO_CFLAGS) \
2610 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2612 endef
2614 else # ENABLE_GIO
2616 define gb_LinkTarget__use_gio
2618 endef
2620 endif # ENABLE_GIO
2622 ifeq ($(ENABLE_AVAHI),TRUE)
2624 define gb_LinkTarget__use_avahi
2625 $(call gb_LinkTarget_set_include,$(1),\
2626 $$(INCLUDE) \
2627 $(AVAHI_CFLAGS) \
2630 $(call gb_LinkTarget_add_defs,$(1),\
2631 -DENABLE_AVAHI \
2634 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2636 endef
2638 else # ENABLE_AVAHI
2640 gb_LinkTarget__use_avahi :=
2642 endif # ENABLE_AVAHI
2644 ifeq ($(ENABLE_CUPS),TRUE)
2646 define gb_LinkTarget__use_cups
2647 $(call gb_LinkTarget_add_defs,$(1),\
2648 -DENABLE_CUPS \
2651 $(call gb_LinkTarget_add_libs,$(1),\
2652 -lcups \
2655 endef
2657 else # ENABLE_CUPS
2659 define gb_LinkTarget__use_cups
2661 endef
2663 endif # ENABLE_CUPS
2665 ifeq ($(ENABLE_DBUS),TRUE)
2667 define gb_LinkTarget__use_dbus
2668 $(call gb_LinkTarget_set_include,$(1),\
2669 $$(INCLUDE) \
2670 $(DBUS_CFLAGS) \
2673 $(call gb_LinkTarget_add_libs,$(1),\
2674 $(DBUS_LIBS) \
2677 endef
2679 else # ENABLE_DBUS
2681 define gb_LinkTarget__use_dbus
2683 endef
2685 endif # ENABLE_DBUS
2688 ifneq ($(SYSTEM_LIBPNG),)
2690 define gb_LinkTarget__use_libpng
2691 $(call gb_LinkTarget_set_include,$(1),\
2692 $$(INCLUDE) \
2693 $(LIBPNG_CFLAGS) \
2696 $(call gb_LinkTarget_add_libs,$(1),\
2697 $(LIBPNG_LIBS) \
2700 endef
2702 gb_ExternalProject__use_libpng :=
2704 else # !SYSTEM_LIBPNG
2706 define gb_LinkTarget__use_libpng
2707 $(call gb_LinkTarget_set_include,$(1),\
2708 $(LIBPNG_CFLAGS) \
2709 $$(INCLUDE) \
2711 $(call gb_LinkTarget_use_static_libraries,$(1),\
2712 libpng \
2714 $(call gb_LinkTarget__use_zlib,$(1))
2716 endef
2718 define gb_ExternalProject__use_libpng
2719 $(call gb_ExternalProject_use_static_libraries,$(1),\
2720 libpng \
2723 endef
2725 endif # !SYSTEM_LIBPNG
2728 ifneq ($(SYSTEM_CURL),)
2730 define gb_LinkTarget__use_curl
2731 $(call gb_LinkTarget_add_defs,$(1),\
2732 -DSYSTEM_CURL \
2734 $(call gb_LinkTarget_set_include,$(1),\
2735 $$(INCLUDE) \
2736 $(CURL_CFLAGS) \
2738 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2740 endef
2742 else # !SYSTEM_CURL
2744 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2745 curl \
2748 define gb_LinkTarget__use_curl
2749 $(call gb_LinkTarget_use_package,$(1),curl)
2750 $(call gb_LinkTarget_set_include,$(1),\
2751 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2752 $$(INCLUDE) \
2755 ifeq ($(COM),MSC)
2756 $(call gb_LinkTarget_add_libs,$(1),\
2757 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-ipv6-sspi-winssl/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
2759 else
2760 $(call gb_LinkTarget_add_libs,$(1),\
2761 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2763 endif
2765 endef
2767 endif # SYSTEM_CURL
2769 ifeq ($(ENABLE_VALGRIND),TRUE)
2771 define gb_LinkTarget__use_valgrind
2772 $(call gb_LinkTarget_add_defs,$(1),\
2773 -DHAVE_VALGRIND_HEADERS \
2776 $(call gb_LinkTarget_set_include,$(1),\
2777 $$(INCLUDE) \
2778 $(VALGRIND_CFLAGS) \
2781 endef
2783 else # !ENABLE_VALGRIND
2785 define gb_LinkTarget__use_valgrind
2787 endef
2789 endif # ENABLE_VALGRIND
2791 ifeq ($(ENABLE_POPPLER),TRUE)
2793 ifneq ($(SYSTEM_POPPLER),)
2795 define gb_LinkTarget__use_poppler
2796 $(call gb_LinkTarget_set_include,$(1),\
2797 $(POPPLER_CFLAGS) \
2798 $$(INCLUDE) \
2801 $(call gb_LinkTarget_add_libs,$(1),\
2802 $(POPPLER_LIBS) \
2805 endef
2807 else # !SYSTEM_POPPLER
2809 define gb_LinkTarget__use_poppler
2810 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2811 $(call gb_LinkTarget_use_package,$(1),poppler_data)
2812 $(call gb_LinkTarget_set_include,$(1),\
2813 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2814 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2815 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2816 $$(INCLUDE) \
2819 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2821 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2823 ifeq ($(OS),MACOSX)
2824 $(call gb_LinkTarget_add_libs,$(1),\
2825 -lobjc \
2827 else ifeq ($(OS),LINUX)
2828 $(call gb_LinkTarget_add_libs,$(1),\
2829 -pthread \
2831 else ifeq ($(OS),WNT)
2832 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2833 advapi32 \
2834 gdi32 \
2836 endif
2838 endef
2840 endif # SYSTEM_POPPLER
2842 endif # ENABLE_POPPLER
2845 ifneq ($(SYSTEM_CLUCENE),)
2847 define gb_LinkTarget__use_clucene
2848 $(call gb_LinkTarget_add_defs,$(1),\
2849 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2852 $(call gb_LinkTarget_set_include,$(1),\
2853 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2854 $$(INCLUDE) \
2857 $(call gb_LinkTarget_add_libs,$(1),\
2858 $(CLUCENE_LIBS) \
2861 endef
2863 else # !SYSTEM_CLUCENE
2865 define gb_LinkTarget__use_clucene
2866 $(call gb_LinkTarget_set_include,$(1),\
2867 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2868 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2869 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2870 $$(INCLUDE) \
2873 $(call gb_LinkTarget_use_libraries,$(1),\
2874 clucene \
2877 endef
2879 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2880 clucene \
2883 endif # SYSTEM_CLUCENE
2885 define gb_LinkTarget__use_gobject
2886 $(call gb_LinkTarget_add_libs,$(1),\
2887 $(GOBJECT_LIBS) \
2890 $(call gb_LinkTarget_set_include,$(1),\
2891 $$(INCLUDE) \
2892 $(GOBJECT_CFLAGS) \
2894 endef
2896 ifneq ($(SYSTEM_HSQLDB),)
2898 define gb_LinkTarget__use_hsqldb
2900 $(call gb_LinkTarget_add_defs,$(1),\
2901 -DSYSTEM_HSQLDB \
2902 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2905 endef
2907 else # !SYSTEM_HSQLDB
2909 define gb_LinkTarget__use_hsqldb
2911 endef
2913 endif # SYSTEM_HSQLDB
2915 ifeq ($(ENABLE_LDAP),TRUE)
2916 ifneq ($(SYSTEM_OPENLDAP),)
2918 define gb_LinkTarget__use_openldap
2920 $(call gb_LinkTarget_add_libs,$(1),\
2921 -lldap \
2922 -llber \
2925 endef
2927 gb_ExternalProject__use_openldap :=
2929 else # !SYSTEM_OPENLDAP
2931 define gb_LinkTarget__use_openldap
2932 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2933 $(call gb_LinkTarget_set_include,$(1),\
2934 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2935 $$(INCLUDE) \
2937 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2938 $(call gb_LinkTarget_add_libs,$(1), \
2939 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2940 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2943 endef
2944 endif
2946 define gb_ExternalProject__use_openldap
2947 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2949 endef
2951 endif # SYSTEM_OPENLDAP
2953 ifneq ($(SYSTEM_LIBTOMMATH),)
2955 define gb_LinkTarget__use_libtommath
2956 $(call gb_LinkTarget_set_include,$(1),\
2957 $(LIBTOMMATH_CFLAGS) \
2958 $$(INCLUDE) \
2960 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2962 endef
2964 else # !SYSTEM_LIBTOMMATH
2965 define gb_LinkTarget__use_libtommath
2966 $(call gb_LinkTarget_set_include,$(1),\
2967 -I${WORKDIR}/UnpackedTarball/libtommath \
2968 $$(INCLUDE) \
2970 $(call gb_LinkTarget_add_libs,$(1),\
2971 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2973 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2975 endef
2977 endif # SYSTEM_LIBTOMMATH
2979 define gb_ExternalProject__use_libtommath
2980 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2982 endef
2984 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2986 ifneq ($(SYSTEM_FIREBIRD),)
2988 define gb_LinkTarget__use_libfbembed
2989 $(call gb_LinkTarget_set_include,$(1),\
2990 $(FIREBIRD_CFLAGS) \
2991 $$(INCLUDE) \
2993 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2995 endef
2997 else # !SYSTEM_FIREBIRD
2999 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
3000 firebird \
3003 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3004 #$(call gb_LinkTarget__use_libtommath,$(1))
3006 define gb_LinkTarget__use_libfbembed
3007 $(call gb_LinkTarget_use_package,$(1),firebird)
3008 $(call gb_LinkTarget_set_include,$(1),\
3009 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3010 $$(INCLUDE) \
3012 ifeq ($(COM),MSC)
3013 $(call gb_LinkTarget_add_libs,$(1),\
3014 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3016 else
3017 $(call gb_LinkTarget_add_libs,$(1),\
3018 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3020 endif
3022 endef
3025 # endef
3027 endif # SYSTEM_FIREBIRD
3029 else # !ENABLE_FIREBIRD_SDBC
3031 gb_LinkTarget__use_firebird :=
3032 # gb_LinkTarget__use_atomic_ops :=
3033 # gb_LinkTarget__use_libtommath :=
3035 endif # ENABLE_FIREBIRD_SDBC
3038 ifneq ($(SYSTEM_POSTGRESQL),)
3040 define gb_LinkTarget__use_postgresql
3042 $(call gb_LinkTarget_set_include,$(1),\
3043 $(POSTGRESQL_INC) \
3044 $$(INCLUDE) \
3047 $(call gb_LinkTarget_add_libs,$(1),\
3048 -lpq \
3051 $(call gb_LinkTarget_add_ldflags,$(1),\
3052 $(POSTGRESQL_LIB) \
3055 endef
3057 else # !SYSTEM_POSTGRESQL
3059 ifeq ($(OS),WNT)
3060 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3061 postgresql \
3063 endif # WNT
3065 define gb_LinkTarget__use_postgresql
3067 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
3069 $(call gb_LinkTarget_set_include,$(1),\
3070 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3071 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3072 $$(INCLUDE) \
3075 ifeq ($(OS),WNT)
3077 $(call gb_LinkTarget_add_libs,$(1),\
3078 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3081 else # !WNT
3083 $(call gb_LinkTarget_add_libs,$(1),\
3084 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3085 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3086 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
3087 $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
3090 endif # !WNT
3092 endef # gb_LinkTarget__use_postgresql
3094 endif # !SYSTEM_POSTGRESQL
3096 ifeq ($(ENABLE_KF5),TRUE)
3098 define gb_LinkTarget__use_kf5
3099 $(call gb_LinkTarget_set_include,$(1),\
3100 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3101 $$(INCLUDE) \
3104 $(call gb_LinkTarget_add_cxxflags,$(1),\
3105 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3108 $(call gb_LinkTarget_add_libs,$(1),\
3109 $(KF5_LIBS) \
3112 endef
3114 else # !ENABLE_KF5
3116 define gb_LinkTarget__use_kf5
3118 endef
3120 endif # ENABLE_KF5
3124 ifeq ($(ENABLE_QT5),TRUE)
3126 define gb_LinkTarget__use_qt5
3127 $(call gb_LinkTarget_set_include,$(1),\
3128 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3129 $$(INCLUDE) \
3132 $(call gb_LinkTarget_add_defs,$(1),\
3133 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3136 $(call gb_LinkTarget_add_libs,$(1),\
3137 $(QT5_LIBS) \
3140 endef
3142 else # !ENABLE_QT5
3144 define gb_LinkTarget__use_qt5
3146 endef
3148 endif # ENABLE_QT5
3150 # PYTHON
3151 # extra python_headers external because pyuno wrapper must not link python
3152 ifneq ($(SYSTEM_PYTHON),)
3154 define gb_LinkTarget__use_python_headers
3155 $(call gb_LinkTarget_add_defs,$(1),\
3156 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3159 $(call gb_LinkTarget_set_include,$(1),\
3160 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3161 $$(INCLUDE) \
3164 endef
3166 define gb_LinkTarget__use_python
3167 $(call gb_LinkTarget__use_python_headers,$(1))
3169 $(call gb_LinkTarget_add_libs,$(1),\
3170 $(PYTHON_LIBS) \
3173 endef
3175 else # !SYSTEM_PYTHON
3177 $(eval $(call gb_Helper_register_packages_for_install,python,\
3178 python3 \
3179 $(if $(filter WNT,$(OS)),libffi) \
3182 define gb_LinkTarget__use_python_headers
3183 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3184 $(call gb_LinkTarget_set_include,$(1),\
3185 -I$(call gb_UnpackedTarball_get_dir,python3) \
3186 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3187 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3188 $$(INCLUDE) \
3191 endef
3193 define gb_LinkTarget__use_python
3194 $(call gb_LinkTarget__use_python_headers,$(1))
3195 ifeq ($(OS),MACOSX)
3196 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3197 else
3198 $(call gb_LinkTarget_use_package,$(1),python3)
3199 endif
3201 ifeq ($(OS),WNT)
3202 ifeq ($(CPUNAME),X86_64)
3203 python_arch_subdir=amd64
3204 else ifeq ($(CPUNAME),AARCH64)
3205 python_arch_subdir=arm64
3206 else
3207 python_arch_subdir=win32
3208 endif
3209 $(call gb_LinkTarget_add_libs,$(1),\
3210 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3212 else ifeq ($(OS),MACOSX)
3213 $(call gb_LinkTarget_add_libs,$(1),\
3214 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3216 else
3217 $(call gb_LinkTarget_add_libs,$(1),\
3218 -L$(call gb_UnpackedTarball_get_dir,python3) \
3219 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3221 endif
3223 endef
3225 # this is only used by python currently
3226 define gb_ExternalProject__use_libffi
3227 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3229 endef
3231 endif # SYSTEM_PYTHON
3233 # ORCUS
3234 ifneq ($(SYSTEM_LIBORCUS),)
3236 define gb_LinkTarget__use_orcus
3237 $(call gb_LinkTarget_set_include,$(1),\
3238 $$(INCLUDE) \
3239 $(ORCUS_CFLAGS) \
3241 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3242 endef
3244 define gb_LinkTarget__use_orcus-parser
3246 endef
3248 else # !SYSTEM_LIBORCUS
3250 ifeq ($(COM),MSC)
3252 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3253 orcus \
3254 orcus-parser \
3257 define gb_LinkTarget__use_orcus
3258 $(call gb_LinkTarget_set_include,$(1),\
3259 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3260 $$(INCLUDE) \
3263 $(call gb_LinkTarget_use_libraries,$(1),\
3264 orcus \
3267 endef
3269 define gb_LinkTarget__use_orcus-parser
3270 $(call gb_LinkTarget_set_include,$(1),\
3271 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3272 $$(INCLUDE) \
3275 $(call gb_LinkTarget_use_libraries,$(1),\
3276 orcus-parser \
3279 endef
3281 else # !MSC
3283 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3284 liborcus \
3287 define gb_LinkTarget__use_orcus
3288 $(call gb_LinkTarget_use_package,$(1),liborcus)
3290 $(call gb_LinkTarget_set_include,$(1),\
3291 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3292 $$(INCLUDE) \
3295 $(call gb_LinkTarget_add_libs,$(1),\
3296 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.16 \
3299 $(if $(SYSTEM_BOOST), \
3300 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3301 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3304 endef
3306 define gb_LinkTarget__use_orcus-parser
3307 $(call gb_LinkTarget_use_package,$(1),liborcus)
3309 $(call gb_LinkTarget_set_include,$(1),\
3310 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3311 $$(INCLUDE) \
3314 $(call gb_LinkTarget_add_libs,$(1),\
3315 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.16 \
3318 endef
3320 endif # MSC
3322 endif # SYSTEM_LIBORCUS
3324 ifeq ($(ENABLE_EOT),TRUE)
3326 ifneq ($(SYSTEM_LIBEOT),)
3328 define gb_LinkTarget__use_libeot
3329 $(call gb_LinkTarget_set_include,$(1),\
3330 $$(INCLUDE) \
3331 $(LIBEOT_CFLAGS) \
3333 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3335 endef
3337 gb_ExternalProject__use_libeot :=
3339 else # !SYSTEM_LIBEOT
3341 define gb_LinkTarget__use_libeot
3342 $(call gb_LinkTarget_set_include,$(1),\
3343 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3344 $$(INCLUDE) \
3346 $(call gb_LinkTarget_add_libs,$(1),\
3347 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3349 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3351 endef
3353 define gb_ExternalProject__use_libeot
3354 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3356 endef
3358 endif # SYSTEM_LIBEOT
3360 else # !ENABLE_EOT
3362 gb_LinkTarget__use_libeot :=
3363 gb_ExternalProject__use_libeot :=
3365 endif # ENABLE_EOT
3367 ### X11 stuff ###
3369 ifeq ($(USING_X11), TRUE)
3371 define gb_LinkTarget__use_Xrandr
3372 $(call gb_LinkTarget_set_include,$(1),\
3373 $$(INCLUDE) \
3374 $(XRANDR_CFLAGS) \
3377 $(call gb_LinkTarget_add_libs,$(1),\
3378 $(XRANDR_LIBS) \
3380 endef
3382 define gb_LinkTarget__use_Xrender
3383 $(call gb_LinkTarget_set_include,$(1),\
3384 $$(INCLUDE) \
3385 $(XRENDER_CFLAGS) \
3388 $(call gb_LinkTarget_add_libs,$(1),\
3389 $(XRENDER_LIBS) \
3391 endef
3393 endif # USING_X11
3396 gb_ExternalProject__use_nss3:=
3399 ifneq ($(SYSTEM_NSS),)
3401 define gb_LinkTarget__use_nss3
3402 $(call gb_LinkTarget_add_defs,$(1),\
3403 -DSYSTEM_NSS \
3406 $(call gb_LinkTarget_set_include,$(1),\
3407 $$(INCLUDE) \
3408 $(NSS_CFLAGS) \
3411 $(call gb_LinkTarget_add_libs,$(1),\
3412 $(NSS_LIBS) \
3415 endef
3417 define gb_LinkTarget__use_plc4
3418 $(call gb_LinkTarget__use_nss3,$(1))
3420 endef
3422 define gb_LinkTarget__use_ssl3
3423 $(call gb_LinkTarget__use_nss3,$(1))
3425 endef
3427 else # !SYSTEM_NSS
3429 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3430 nss \
3433 define gb_LinkTarget__use_nss3
3434 $(call gb_LinkTarget_use_package,$(1),nss)
3435 $(call gb_LinkTarget_set_include,$(1),\
3436 $$(INCLUDE) \
3437 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3438 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3441 ifeq ($(COM),MSC)
3442 $(call gb_LinkTarget_add_libs,$(1),\
3443 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3444 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3445 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3447 else
3448 $(call gb_LinkTarget_add_libs,$(1),\
3449 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3450 -lnspr4 \
3451 -lnss3 \
3452 -lsmime3 \
3454 endif
3456 endef
3458 define gb_LinkTarget__use_plc4
3459 $(call gb_LinkTarget_use_package,$(1),nss)
3460 ifeq ($(COM),MSC)
3461 $(call gb_LinkTarget_add_libs,$(1),\
3462 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3464 else
3465 $(call gb_LinkTarget_add_libs,$(1),\
3466 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3468 endif
3470 endef
3472 define gb_LinkTarget__use_ssl3
3473 $(call gb_LinkTarget_use_package,$(1),nss)
3474 ifeq ($(COM),MSC)
3475 $(call gb_LinkTarget_add_libs,$(1),\
3476 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3478 else
3479 $(call gb_LinkTarget_add_libs,$(1),\
3480 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3482 endif
3484 endef
3486 define gb_ExternalProject__use_nss3
3487 $(call gb_ExternalProject_use_package,$(1),nss)
3489 endef
3491 endif # SYSTEM_NSS
3493 ifeq ($(ENABLE_BREAKPAD),TRUE)
3495 define gb_LinkTarget__use_breakpad
3496 $(call gb_LinkTarget_set_include,$(1),\
3497 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3498 $$(INCLUDE) \
3501 ifeq ($(COM),MSC)
3502 $(call gb_LinkTarget_use_static_libraries,$(1),\
3503 breakpad \
3505 else
3506 $(call gb_LinkTarget_add_libs,$(1),\
3507 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3509 endif
3511 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3513 endef
3515 endif # ENABLE_BREAKPAD
3517 ifeq ($(ENABLE_GPGMEPP),TRUE)
3519 ifneq ($(SYSTEM_GPGMEPP),)
3521 gb_ExternalProject__use_gpgmepp:=
3522 gb_ExternalProject__use_libassuan:=
3523 gb_ExternalProject__use_libgpg-error:=
3525 define gb_LinkTarget__use_gpgmepp
3526 $(call gb_LinkTarget_set_include,$(1),\
3527 $$(INCLUDE) \
3528 $$(GPGMEPP_CFLAGS) \
3531 $(call gb_LinkTarget_add_libs,$(1),\
3532 $(GPGMEPP_LIBS) \
3535 endef
3537 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3539 define gb_ExternalProject__use_gpgmepp
3540 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3542 endef
3543 define gb_ExternalProject__use_libassuan
3544 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3546 endef
3547 define gb_ExternalProject__use_libgpg-error
3548 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3550 endef
3552 ifneq ($(filter WNT,$(OS)),)
3554 define gb_LinkTarget__use_libgpg-error
3555 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3557 $(call gb_LinkTarget_set_include,$(1),\
3558 $(GPG_ERROR_CFLAGS) \
3559 $$(INCLUDE) \
3561 $(call gb_LinkTarget_add_libs,$(1),\
3562 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3565 endef
3567 define gb_LinkTarget__use_libassuan
3568 $(call gb_LinkTarget_use_package,$(1),libassuan)
3570 $(call gb_LinkTarget_set_include,$(1),\
3571 $(LIBASSUAN_CFLAGS) \
3572 $$(INCLUDE) \
3574 $(call gb_LinkTarget_add_libs,$(1),\
3575 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3578 endef
3580 define gb_LinkTarget__use_gpgmepp
3581 $(call gb_LinkTarget_set_include,$(1),\
3582 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3583 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3584 $$(GPG_ERROR_CFLAGS) \
3585 $$(INCLUDE) \
3587 $(call gb_LinkTarget_use_libraries,$(1),\
3588 gpgmepp \
3591 endef
3593 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3594 gpgmepp \
3595 libassuan \
3596 libgpg-error \
3599 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3600 gpgmepp \
3603 endif
3605 ifneq ($(filter MACOSX LINUX,$(OS)),)
3607 define gb_LinkTarget__use_gpgmepp
3608 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3610 $(call gb_LinkTarget_set_include,$(1),\
3611 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3612 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3613 $$(GPG_ERROR_CFLAGS) \
3614 $$(INCLUDE) \
3616 $(call gb_LinkTarget_add_libs,$(1),\
3617 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3618 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3619 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3620 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3623 endef
3625 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3626 gpgmepp \
3627 libassuan \
3628 libgpg-error \
3631 endif
3633 endif
3635 else # !ENABLE_GPGMEPP
3637 gb_ExternalProject__use_gpgmepp :=
3638 gb_ExternalProject__use_libassuan :=
3639 gb_ExternalProject__use_libgpg-error :=
3641 gb_LinkTarget__use_gpgmepp :=
3642 gb_LinkTarget__use_libassuan :=
3643 gb_LinkTarget__use_libgpg-error :=
3645 endif # ENABLE_GPGMEPP
3647 define gb_LinkTarget__use_dconf
3648 $(call gb_LinkTarget_set_include,$(1),\
3649 $$(INCLUDE) \
3650 $(DCONF_CFLAGS) \
3653 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3654 endef
3656 ### Jars ############################################################
3658 ifneq ($(SYSTEM_HSQLDB),)
3660 define gb_Jar__use_hsqldb
3661 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3662 endef
3663 define gb_JunitTest__use_hsqldb
3664 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3665 endef
3667 else # !SYSTEM_HSQLDB
3669 ifeq ($(ENABLE_JAVA),TRUE)
3670 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3671 hsqldb \
3673 endif
3675 define gb_Jar__use_hsqldb
3676 $(call gb_Jar_use_jar,$(1),hsqldb)
3677 endef
3678 define gb_JunitTest__use_hsqldb
3679 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3680 endef
3682 endif # SYSTEM_HSQLDB
3685 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3687 ifneq ($(SYSTEM_BSH),)
3689 define gb_Jar__use_bsh
3690 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3691 endef
3693 else # !SYSTEM_BSH
3695 ifeq ($(ENABLE_JAVA),TRUE)
3696 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3697 bsh \
3699 endif
3701 define gb_Jar__use_bsh
3702 $(call gb_Jar_use_jar,$(1),bsh)
3703 endef
3705 endif # SYSTEM_BSH
3707 endif
3709 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3711 ifneq ($(SYSTEM_RHINO),)
3713 define gb_Jar__use_rhino
3714 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3715 endef
3717 else # !SYSTEM_RHINO
3719 ifeq ($(ENABLE_JAVA),TRUE)
3720 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3721 js \
3723 endif
3725 define gb_Jar__use_rhino
3726 $(call gb_Jar_use_jar,$(1),js)
3727 endef
3729 endif # SYSTEM_RHINO
3731 endif
3733 ifneq ($(SYSTEM_JFREEREPORT),)
3735 define gb_Jar__use_flow-engine
3736 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3737 endef
3739 define gb_Jar__use_flute
3740 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3741 endef
3743 define gb_Jar__use_libbase
3744 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3745 endef
3747 define gb_Jar__use_libfonts
3748 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3749 endef
3751 define gb_Jar__use_libformula
3752 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3753 endef
3755 define gb_Jar__use_liblayout
3756 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3757 endef
3759 define gb_Jar__use_libloader
3760 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3761 endef
3763 define gb_Jar__use_librepository
3764 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3765 endef
3767 define gb_Jar__use_libserializer
3768 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3769 endef
3771 define gb_Jar__use_libxml
3772 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3773 endef
3775 define gb_Jar__use_sac
3776 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3777 endef
3779 else # !SYSTEM_JFREEREPORT
3781 ifeq ($(ENABLE_JAVA),TRUE)
3782 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3783 flow-engine \
3784 flute-1.1.6 \
3785 libbase-1.1.6 \
3786 libfonts-1.1.6 \
3787 libformula-1.1.7 \
3788 liblayout \
3789 libloader-1.1.6 \
3790 librepository-1.1.6 \
3791 libserializer-1.1.6 \
3792 libxml-1.1.7 \
3793 sac \
3795 endif
3797 define gb_Jar__use_flow-engine
3798 $(call gb_Jar_use_jar,$(1),flow-engine)
3799 endef
3801 define gb_Jar__use_flute
3802 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3803 endef
3805 define gb_Jar__use_libbase
3806 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3807 endef
3809 define gb_Jar__use_libfonts
3810 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3811 endef
3813 define gb_Jar__use_libformula
3814 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3815 endef
3817 define gb_Jar__use_liblayout
3818 $(call gb_Jar_use_jar,$(1),liblayout)
3819 endef
3821 define gb_Jar__use_libloader
3822 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3823 endef
3825 define gb_Jar__use_librepository
3826 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3827 endef
3829 define gb_Jar__use_libserializer
3830 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3831 endef
3833 define gb_Jar__use_libxml
3834 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3835 endef
3837 define gb_Jar__use_sac
3838 $(call gb_Jar_use_jar,$(1),sac)
3839 endef
3841 endif # SYSTEM_JFREEREPORT
3844 # Executables
3846 define gb_Executable__register_bestreversemap
3847 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3848 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target_for_build,sal_textenc))) \
3850 endef
3852 # TODO depending on the whole URE might be overkill, but I do not have a
3853 # Windows machine to debug it...
3854 define gb_Executable__register_climaker
3855 $(call gb_Executable_add_runtime_dependencies,climaker,\
3856 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3857 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3858 $(call gb_UnoApi_get_target_for_build,udkapi) \
3859 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3861 endef
3863 define gb_Executable__register_cppumaker
3864 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3865 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3867 endef
3869 # This is used to determine what we need for 'build' platform.
3870 define gb_Executable__register_gengal
3871 $(call gb_Executable_add_runtime_dependencies,gengal,\
3872 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3873 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
3874 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
3875 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3876 $(call gb_Package_get_target_for_build,postprocess_registry) \
3877 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3878 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3879 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3880 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3881 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3882 $(call gb_UnoApi_get_target_for_build,offapi) \
3883 $(call gb_UnoApi_get_target_for_build,udkapi) \
3885 endef
3887 ifeq ($(SYSTEM_ICU),)
3889 define gb_Executable__register_gendict
3890 $(call gb_Executable_add_runtime_dependencies,gendict,\
3891 $(call gb_Package_get_target_for_build,icu) \
3892 $(call gb_Package_get_target_for_build,icu_ure) \
3894 endef
3896 endif
3898 define gb_Executable__register_idlc
3899 $(call gb_Executable_add_runtime_dependencies,idlc,\
3900 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3902 endef
3904 define gb_Executable__register_localize
3905 $(call gb_Executable_add_runtime_dependencies,localize,\
3906 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3907 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3910 endef
3912 # FIXME ure/services.rdb needs cleanup
3913 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3914 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3915 define gb_Executable__register_saxparser
3916 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3917 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3918 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3919 $(call gb_Rdb_get_target_for_build,saxparser) \
3920 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3921 $(call gb_UnoApi_get_target_for_build,udkapi) \
3923 endef
3925 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3926 # required due to the settings for URE_SERVICES and URE_TYPES in
3927 # cppuhelper/source/unorc
3928 define gb_Executable__register_uno
3929 $(call gb_Executable_add_runtime_dependencies,uno,\
3930 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3931 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3932 $(call gb_UnoApi_get_target_for_build,udkapi) \
3934 endef
3937 # External executables
3939 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3941 gb_ExternalExecutable__register_xmllint :=
3943 else # ! SYSTEM_LIBXML_FOR_BUILD
3945 define gb_ExternalExecutable__register_xmllint
3946 $(call gb_ExternalExecutable_set_internal,xmllint,$(WORKDIR_FOR_BUILD)/UnpackedTarball/libxml2/$(if $(filter MSC,$(COM)),win32/bin.msvc)/xmllint$(gb_Executable_EXT_for_build),libxml2)
3947 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3948 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3949 $(call gb_Package_get_target,libxml2) \
3952 endef
3954 endif # SYSTEM_LIBXML_FOR_BUILD
3956 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3958 gb_ExternalExecutable__register_xsltproc :=
3960 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3962 define gb_ExternalExecutable__register_xsltproc
3963 $(call gb_ExternalExecutable_set_internal,xsltproc,$(WORKDIR_FOR_BUILD)/UnpackedTarball/libxslt/$(if $(filter MSC,$(COM)),win32/bin.msvc,xsltproc)/xsltproc$(gb_Executable_EXT_for_build),libxslt)
3964 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3965 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3966 $(call gb_Package_get_target,libxml2) \
3967 $(call gb_Package_get_target,libxslt) \
3970 endef
3972 endif # SYSTEM_LIBXSLT_FOR_BUILD
3974 ifneq (,$(SYSTEM_UCPP))
3976 gb_ExternalExecutable__register_ucpp :=
3978 else # ! SYSTEM_UCPP
3980 define gb_ExternalExecutable__register_ucpp
3981 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3983 endef
3985 endif # SYSTEM_UCPP
3987 ifeq (,$(PYTHON_FOR_BUILD))
3989 define gb_ExternalExecutable__register_python
3990 ifeq ($(OS),MACOSX)
3992 # use set_external, to avoid having the command added as prerequisite for the
3993 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3994 # matching rule to build that specific file)
3995 $(call gb_ExternalExecutable_set_external,python,$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO/LibreOfficePython.framework/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR))
3996 # the Zip ensures that internal python has been built (cannot use the Package
3997 # target, as that is not used on Mac)
3998 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4000 else
4002 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT_FOR_BUILD)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4003 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4004 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4006 endif
4008 endef
4010 else
4012 define gb_ExternalExecutable__register_python
4013 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4015 endef
4017 endif # PYTHON_FOR_BUILD
4019 ifneq ($(SYSTEM_GENBRK),)
4021 define gb_ExternalExecutable__register_genbrk
4022 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4024 endef
4026 else # ! SYSTEM_GENBRK
4028 define gb_ExternalExecutable__register_genbrk
4029 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4030 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4031 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4032 $(call gb_Package_get_target_for_build,icu) \
4033 $(call gb_Package_get_target_for_build,icu_ure) \
4036 endef
4038 endif
4040 ifneq ($(SYSTEM_GENCCODE),)
4042 define gb_ExternalExecutable__register_genccode
4043 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4045 endef
4047 else # ! SYSTEM_GENCCODE
4049 define gb_ExternalExecutable__register_genccode
4050 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4051 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4052 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4053 $(call gb_Package_get_target_for_build,icu) \
4054 $(call gb_Package_get_target_for_build,icu_ure) \
4057 endef
4059 endif
4061 ifneq ($(SYSTEM_GENCMN),)
4063 define gb_ExternalExecutable__register_gencmn
4064 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4066 endef
4068 else # ! SYSTEM_GENCMN
4070 define gb_ExternalExecutable__register_gencmn
4071 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4072 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4073 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4074 $(call gb_Package_get_target_for_build,icu) \
4075 $(call gb_Package_get_target_for_build,icu_ure) \
4078 endef
4080 endif
4082 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4083 ifneq ($(SYSTEM_BZIP2),)
4085 define gb_LinkTarget__use_bzip2
4086 $(call gb_LinkTarget_set_include,$(1),\
4087 $(BZIP2_CFLAGS) \
4088 $$(INCLUDE) \
4090 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4092 endef
4094 gb_ExternalProject__use_bzip2 :=
4096 else # !SYSTEM_BZIP2
4098 define gb_LinkTarget__use_bzip2
4099 $(call gb_LinkTarget_set_include,$(1),\
4100 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4101 $$(INCLUDE) \
4104 ifeq ($(COM),MSC)
4105 $(call gb_LinkTarget_add_libs,$(1),\
4106 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4108 else
4109 $(call gb_LinkTarget_add_libs,$(1),\
4110 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4112 endif
4114 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4115 endef
4117 define gb_ExternalProject__use_bzip2
4118 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4119 endef
4121 endif
4122 endif
4124 define gb_LinkTarget__use_clew
4125 $(call gb_LinkTarget_set_include,$(1), \
4126 -I$(SRCDIR)/external/clew/source/include \
4127 $$(INCLUDE) \
4129 $(call gb_LinkTarget_use_libraries,$(1),clew)
4130 endef
4132 ifneq ($(ENABLE_PDFIUM),)
4133 define gb_LinkTarget__use_pdfium
4134 $(call gb_LinkTarget_set_include,$(1),\
4135 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4136 -DCOMPONENT_BUILD \
4137 $$(INCLUDE) \
4139 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4140 endef
4141 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4142 pdfium \
4144 endif
4146 define gb_LinkTarget__use_dtoa
4147 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4148 $(call gb_LinkTarget_set_include,$(1),\
4149 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4150 $$(INCLUDE) \
4152 $(call gb_LinkTarget_use_static_libraries,$(1),\
4153 dtoa \
4156 endef
4158 define gb_ExternalProject__use_dtoa
4159 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4161 endef
4163 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4164 $(if $(UCRT_REDISTDIR),ucrt) \
4167 ifneq ($(SYSTEM_BOX2D),)
4169 define gb_LinkTarget__use_box2d
4170 $(call gb_LinkTarget_set_include,$(1),\
4171 -DSYSTEM_BOX2D \
4172 $$(INCLUDE) \
4173 $(BOX2D_CFLAGS) \
4175 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4177 endef
4179 gb_ExternalProject__use_box2d :=
4181 else # !SYSTEM_BOX2D
4183 define gb_LinkTarget__use_box2d
4184 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4185 $(call gb_LinkTarget_set_include,$(1),\
4186 -I$(call gb_UnpackedTarball_get_dir,box2d/Box2D/)\
4187 $$(INCLUDE) \
4189 $(call gb_LinkTarget_use_static_libraries,$(1),\
4190 box2d \
4193 endef
4195 define gb_ExternalProject__use_box2d
4196 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4198 endef
4200 endif # SYSTEM_BOX2D
4202 ifneq ($(SYSTEM_ZXING),)
4204 define gb_LinkTarget__use_zxing
4205 $(call gb_LinkTarget_set_include,$(1),\
4206 -DSYSTEM_ZXING \
4207 $$(INCLUDE) \
4208 $(ZXING_CFLAGS) \
4210 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4212 endef
4214 gb_ExternalProject__use_zxing :=
4216 else # !SYSTEM_ZXING
4218 ifneq ($(ENABLE_ZXING),)
4220 define gb_LinkTarget__use_zxing
4221 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4222 $(call gb_LinkTarget_set_include,$(1),\
4223 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4224 $$(INCLUDE) \
4226 $(call gb_LinkTarget_use_static_libraries,$(1),\
4227 zxing \
4230 endef
4232 define gb_ExternalProject__use_zxing
4233 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4235 endef
4237 else # !ENABLE_ZXING
4239 define gb_LinkTarget__use_zxing
4240 endef
4242 endif # ENABLE_ZXING
4244 endif # SYSTEM_ZXING
4246 # vim: set noet sw=4 ts=4: