[en-US] Added 13 words to autocorrect
[LibreOffice.git] / RepositoryExternal.mk
blob03833bd5c56a85aace467aac44829b4715077292
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)
1099 endif
1101 endef
1103 define gb_ExternalProject__use_apr
1104 ifeq ($(SYSTEM_APR),)
1105 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1106 endif
1108 endef
1110 define gb_LinkTarget__use_serf
1111 $(call gb_LinkTarget_set_include,$(1),\
1112 $(SERF_CFLAGS) \
1113 $$(INCLUDE) \
1115 $(call gb_LinkTarget_add_libs,$(1),\
1116 $(SERF_LIBS) \
1119 ifeq ($(SYSTEM_SERF),)
1120 $(call gb_LinkTarget_use_external_project,$(1),serf)
1121 endif
1123 endef
1125 else ifeq ($(WITH_WEBDAV),neon)
1127 ifneq ($(SYSTEM_NEON),)
1129 define gb_LinkTarget__use_neon
1130 $(call gb_LinkTarget_add_defs,$(1),\
1131 -DNEON_VERSION=0x$(NEON_VERSION) \
1132 -DSYSTEM_NEON \
1134 $(call gb_LinkTarget_set_include,$(1),\
1135 $$(INCLUDE) \
1136 $(NEON_CFLAGS) \
1139 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1141 endef
1143 else # !SYSTEM_NEON
1145 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1146 neon \
1149 define gb_LinkTarget__use_neon
1150 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1151 $(call gb_LinkTarget_set_include,$(1),\
1152 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1153 $$(INCLUDE) \
1155 $(call gb_LinkTarget_use_libraries,$(1),\
1156 neon \
1159 endef
1161 endif # SYSTEM_NEON
1163 endif # WITH_WEBDAV
1165 ifneq ($(SYSTEM_REDLAND),)
1167 define gb_LinkTarget__use_librdf
1168 $(call gb_LinkTarget_add_defs,$(1),\
1169 -DSYSTEM_REDLAND \
1171 $(call gb_LinkTarget_set_include,$(1),\
1172 $$(INCLUDE) \
1173 $(REDLAND_CFLAGS) \
1175 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1177 endef
1179 gb_LinkTarget__use_redland_headers:=
1181 gb_LinkTarget__use_raptor_headers:=
1183 gb_LinkTarget__use_rasqal_headers:=
1185 else # !SYSTEM_REDLAND
1187 define gb_LinkTarget__use_redland_headers
1188 $(call gb_LinkTarget_set_include,$(1),\
1189 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1190 $$(INCLUDE) \
1193 endef
1195 define gb_LinkTarget__use_raptor_headers
1196 $(call gb_LinkTarget_set_include,$(1),\
1197 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1198 $$(INCLUDE) \
1201 endef
1203 define gb_LinkTarget__use_rasqal_headers
1204 $(call gb_LinkTarget_set_include,$(1),\
1205 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1206 $$(INCLUDE) \
1209 endef
1211 ifneq ($(OS),ANDROID)
1213 ifeq ($(COM),MSC)
1214 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1215 raptor2 \
1216 rasqal \
1217 rdf \
1219 else
1220 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1221 raptor \
1222 rasqal \
1223 redland \
1225 endif
1227 define gb_LinkTarget__use_librdf
1228 ifeq ($(COM),MSC)
1229 $(call gb_LinkTarget_use_libraries,$(1),\
1230 raptor2 \
1231 rdf \
1233 else
1234 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1236 $(call gb_LinkTarget_add_libs,$(1),\
1237 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1238 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1239 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1241 endif
1243 endef
1245 else # ANDROID
1247 define gb_LinkTarget__use_librdf
1248 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1250 endef
1252 endif # ANDROID
1254 endif # SYSTEM_REDLAND
1257 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(DISABLE_GUI),) # or
1259 ifneq ($(SYSTEM_CAIRO),)
1261 define gb_LinkTarget__use_cairo
1262 $(call gb_LinkTarget_set_include,$(1),\
1263 $$(INCLUDE) \
1264 $(CAIRO_CFLAGS) \
1266 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1267 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1269 endef
1271 else # !SYSTEM_CAIRO
1273 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1274 cairo \
1275 $(if $(filter $(OS),WNT),,pixman) \
1278 define gb_LinkTarget__use_cairo
1279 $(call gb_LinkTarget_use_package,$(1),cairo)
1280 $(call gb_LinkTarget_use_package,$(1),pixman)
1281 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1282 $(call gb_LinkTarget_set_include,$(1),\
1283 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1284 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1285 $$(INCLUDE) \
1287 $(call gb_LinkTarget_add_libs,$(1),\
1288 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1289 $(if $(filter-out MACOSX WNT,$(OS)), \
1290 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1294 endef
1296 endif # SYSTEM_CAIRO
1298 else ifeq ($(OS),ANDROID)
1300 define gb_LinkTarget__use_cairo
1301 $(call gb_LinkTarget_use_package,$(1),cairo)
1302 $(call gb_LinkTarget_use_package,$(1),pixman)
1303 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1304 $(call gb_LinkTarget_set_include,$(1),\
1305 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1306 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1307 $$(INCLUDE) \
1309 $(call gb_LinkTarget_add_libs,$(1),\
1310 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1311 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1314 endef
1316 endif # CAIRO
1318 ifneq ($(SYSTEM_FREETYPE),)
1320 define gb_LinkTarget__use_freetype_headers
1321 $(call gb_LinkTarget_set_include,$(1),\
1322 $$(INCLUDE) \
1323 $(FREETYPE_CFLAGS) \
1326 endef
1328 gb_ExternalProject__use_freetype :=
1330 else
1332 define gb_LinkTarget__use_freetype_headers
1333 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1334 $(call gb_LinkTarget_set_include,$(1),\
1335 $(FREETYPE_CFLAGS) \
1336 $$(INCLUDE) \
1339 endef
1341 define gb_ExternalProject__use_freetype
1342 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1344 endef
1346 endif # SYSTEM_FREETYPE
1348 define gb_LinkTarget__use_freetype
1349 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1350 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1352 endef
1354 ifneq ($(SYSTEM_FONTCONFIG),)
1356 define gb_LinkTarget__use_fontconfig
1357 $(call gb_LinkTarget_set_include,$(1),\
1358 $$(INCLUDE) \
1359 $(FONTCONFIG_CFLAGS) \
1362 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1364 endef
1366 else
1368 define gb_LinkTarget__use_fontconfig
1369 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1370 $(call gb_LinkTarget_set_include,$(1),\
1371 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1372 $$(INCLUDE) \
1375 $(call gb_LinkTarget_add_libs,$(1),\
1376 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1379 endef
1381 endif # SYSTEM_FONTCONFIG
1383 ifneq ($(SYSTEM_GRAPHITE),)
1385 define gb_LinkTarget__use_graphite
1386 $(call gb_LinkTarget_set_include,$(1),\
1387 $$(INCLUDE) \
1388 $(GRAPHITE_CFLAGS) \
1390 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1392 endef
1394 gb_ExternalProject__use_graphite:=
1396 else # !SYSTEM_GRAPHITE
1398 define gb_LinkTarget__use_graphite
1399 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1400 $(call gb_LinkTarget_set_include,$(1),\
1401 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1402 $$(INCLUDE) \
1404 $(call gb_LinkTarget_use_static_libraries,$(1),\
1405 graphite \
1408 endef
1410 define gb_ExternalProject__use_graphite
1411 $(call gb_ExternalProject_use_static_libraries,$(1),\
1412 graphite \
1415 endef
1416 endif # SYSTEM_GRAPHITE
1418 ifneq ($(SYSTEM_ICU),)
1420 gb_LinkTarget__use_icu_headers:=
1421 gb_ExternalProject__use_icu:=
1423 define gb_LinkTarget__use_icudata
1424 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1426 endef
1427 define gb_LinkTarget__use_icui18n
1428 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1430 endef
1431 define gb_LinkTarget__use_icuuc
1432 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1434 endef
1436 else # !SYSTEM_ICU
1438 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1439 icu_ure \
1442 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1443 icu \
1446 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1447 gb_ICU_suffix:=lo
1448 else
1449 gb_ICU_suffix:=
1450 endif
1452 define gb_LinkTarget__use_icu_headers
1453 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1454 $(call gb_LinkTarget_set_include,$(1),\
1455 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1456 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1457 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1458 $$(INCLUDE) \
1461 endef
1463 define gb_ExternalProject__use_icu
1464 $(call gb_ExternalProject_use_package,$(1),icu)
1466 endef
1468 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1469 define gb_LinkTarget__use_icudata
1470 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1472 ifeq ($(OS),WNT)
1473 $(call gb_LinkTarget_add_libs,$(1),\
1474 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1476 else
1477 $(call gb_LinkTarget_add_libs,$(1),\
1478 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1480 endif
1482 endef
1484 define gb_LinkTarget__use_icui18n
1485 $(call gb_LinkTarget_use_package,$(1),icu)
1487 ifeq ($(OS),WNT)
1488 $(call gb_LinkTarget_add_libs,$(1),\
1489 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1491 else
1492 $(call gb_LinkTarget_add_libs,$(1),\
1493 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1495 endif
1497 endef
1499 define gb_LinkTarget__use_icuuc
1500 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1502 ifeq ($(OS),WNT)
1503 $(call gb_LinkTarget_add_libs,$(1),\
1504 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1506 else
1507 $(call gb_LinkTarget_add_libs,$(1),\
1508 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1510 endif
1512 endef
1514 endif # SYSTEM_ICU
1516 ifneq ($(SYSTEM_HARFBUZZ),)
1518 define gb_LinkTarget__use_harfbuzz
1519 $(call gb_LinkTarget_set_include,$(1),\
1520 $$(INCLUDE) \
1521 $(HARFBUZZ_CFLAGS) \
1523 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1525 endef
1527 gb_ExternalProject__use_harfbuzz :=
1529 else # SYSTEM_HARFBUZZ != TRUE
1531 define gb_LinkTarget__use_harfbuzz
1532 $(call gb_LinkTarget_set_include,$(1),\
1533 $(HARFBUZZ_CFLAGS) \
1534 $$(INCLUDE) \
1536 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1537 $(call gb_LinkTarget_use_external,$(1),icuuc)
1538 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1540 endef
1542 define gb_ExternalProject__use_harfbuzz
1543 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1545 endef
1547 endif # SYSTEM_HARFBUZZ
1549 ifeq ($(DISABLE_OPENSSL),TRUE)
1551 gb_ExternalProject__use_openssl:=
1552 gb_LinkTarget__use_openssl_headers:=
1553 gb_LinkTarget__use_openssl:=
1555 else # !DISABLE_OPENSSL
1557 ifneq ($(SYSTEM_OPENSSL),)
1559 gb_LinkTarget__use_openssl_headers:=
1560 gb_ExternalProject__use_openssl:=
1562 define gb_LinkTarget__use_openssl
1563 $(call gb_LinkTarget_set_include,$(1),\
1564 $$(INCLUDE) \
1565 $(OPENSSL_CFLAGS) \
1567 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1569 endef
1571 else # !SYSTEM_OPENSSL
1573 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1574 openssl \
1577 define gb_ExternalProject__use_openssl
1578 $(call gb_ExternalProject_use_package,$(1),openssl)
1580 endef
1582 define gb_LinkTarget__use_openssl_headers
1583 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1584 $(call gb_LinkTarget_set_include,$(1),\
1585 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1586 $$(INCLUDE) \
1589 endef
1591 define gb_LinkTarget__use_openssl
1592 $(call gb_LinkTarget_use_package,$(1),openssl)
1593 ifeq ($(OS),WNT)
1594 $(call gb_LinkTarget_add_libs,$(1),\
1595 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1596 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1598 else
1599 $(call gb_LinkTarget_add_libs,$(1),\
1600 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1601 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1602 $(if $(filter $(OS),LINUX),-pthread) \
1604 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1605 ifeq ($(OS),SOLARIS)
1606 $(call gb_LinkTarget_add_libs,$(1),\
1607 -lnsl \
1608 -lsocket \
1610 endif
1611 endif
1613 endef
1615 endif # SYSTEM_OPENSSL
1616 endif # DISABLE_OPENSSL
1619 ifeq ($(DISABLE_OPENSSL),TRUE)
1621 define gb_LinkTarget__use_gnutls
1622 $(call gb_LinkTarget_set_include,$(1),\
1623 $$(INCLUDE) \
1624 $(GNUTLS_CFLAGS) \
1627 $(call gb_LinkTarget_add_defs,$(1),\
1628 -DDISABLE_OPENSSL \
1631 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1633 endef
1635 define gb_LinkTarget__use_libgcrypt
1636 $(call gb_LinkTarget_set_include,$(1),\
1637 $$(INCLUDE) \
1638 $(LIBGCRYPT_CFLAGS) \
1641 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1643 endef
1645 else # !DISABLE_OPENSSL
1647 gb_LinkTarget__use_gnutls:=
1648 gb_LinkTarget__use_libgcrypt:=
1650 endif # DISABLE_OPENSSL
1653 ifneq ($(SYSTEM_CDR),)
1655 define gb_LinkTarget__use_cdr
1656 $(call gb_LinkTarget_set_include,$(1),\
1657 $$(INCLUDE) \
1658 $(CDR_CFLAGS) \
1660 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1662 endef
1664 else # !SYSTEM_CDR
1666 define gb_LinkTarget__use_cdr
1667 $(call gb_LinkTarget_set_include,$(1),\
1668 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1669 $$(INCLUDE) \
1671 $(call gb_LinkTarget_add_libs,$(1),\
1672 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1674 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1675 endef
1677 endif # SYSTEM_CDR
1680 ifneq ($(SYSTEM_EBOOK),)
1682 define gb_LinkTarget__use_ebook
1683 $(call gb_LinkTarget_set_include,$(1),\
1684 $$(INCLUDE) \
1685 $(EBOOK_CFLAGS) \
1687 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1689 endef
1691 gb_ExternalProject__use_ebook :=
1693 else # !SYSTEM_EBOOK
1695 define gb_LinkTarget__use_ebook
1696 $(call gb_LinkTarget_set_include,$(1),\
1697 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1698 $$(INCLUDE) \
1700 $(call gb_LinkTarget_add_libs,$(1),\
1701 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1703 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1705 endef
1707 define gb_ExternalProject__use_ebook
1708 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1710 endef
1712 endif # SYSTEM_EBOOK
1715 ifneq ($(SYSTEM_ETONYEK),)
1717 define gb_LinkTarget__use_etonyek
1718 $(call gb_LinkTarget_set_include,$(1),\
1719 $$(INCLUDE) \
1720 $(ETONYEK_CFLAGS) \
1722 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1724 endef
1726 gb_ExternalProject__use_etonyek :=
1728 else # !SYSTEM_ETONYEK
1730 ifeq ($(COM),MSC)
1732 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1733 etonyek \
1736 define gb_LinkTarget__use_etonyek
1737 $(call gb_LinkTarget_set_include,$(1),\
1738 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1739 $$(INCLUDE) \
1741 $(call gb_LinkTarget_use_libraries,$(1),\
1742 etonyek \
1745 endef
1747 else # !MSC
1749 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1750 libetonyek \
1753 define gb_LinkTarget__use_etonyek
1754 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1756 $(call gb_LinkTarget_set_include,$(1),\
1757 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1758 -DLIBETONYEK_VISIBILITY \
1759 $$(INCLUDE) \
1761 $(call gb_LinkTarget_add_libs,$(1),\
1762 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1764 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1766 endef
1768 define gb_ExternalProject__use_etonyek
1769 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1771 endef
1773 endif
1775 endif # SYSTEM_ETONYEK
1778 ifneq ($(SYSTEM_FREEHAND),)
1780 define gb_LinkTarget__use_freehand
1781 $(call gb_LinkTarget_set_include,$(1),\
1782 $$(INCLUDE) \
1783 $(FREEHAND_CFLAGS) \
1785 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1787 endef
1789 gb_ExternalProject__use_freehand :=
1791 else # !SYSTEM_FREEHAND
1793 define gb_LinkTarget__use_freehand
1794 $(call gb_LinkTarget_set_include,$(1),\
1795 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1796 $$(INCLUDE) \
1798 $(call gb_LinkTarget_add_libs,$(1),\
1799 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1801 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1803 endef
1805 define gb_ExternalProject__use_freehand
1806 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1808 endef
1810 endif # SYSTEM_FREEHAND
1813 ifneq ($(SYSTEM_ODFGEN),)
1815 define gb_LinkTarget__use_odfgen
1816 $(call gb_LinkTarget_set_include,$(1),\
1817 $$(INCLUDE) \
1818 $(ODFGEN_CFLAGS) \
1820 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1822 endef
1824 else # !SYSTEM_ODFGEN
1826 ifeq ($(COM),MSC)
1828 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1829 odfgen \
1832 define gb_LinkTarget__use_odfgen
1833 $(call gb_LinkTarget_set_include,$(1),\
1834 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1835 $$(INCLUDE) \
1837 $(call gb_LinkTarget_use_libraries,$(1),\
1838 odfgen \
1841 endef
1843 else # !MSC
1845 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1846 libodfgen \
1849 define gb_LinkTarget__use_odfgen
1850 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1852 $(call gb_LinkTarget_set_include,$(1),\
1853 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1854 -DLIBODFGEN_VISIBILITY \
1855 $$(INCLUDE) \
1857 $(call gb_LinkTarget_add_libs,$(1),\
1858 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1861 endef
1863 endif
1865 endif # SYSTEM_ODFGEN
1867 ifneq ($(SYSTEM_EPUBGEN),)
1869 define gb_LinkTarget__use_epubgen
1870 $(call gb_LinkTarget_set_include,$(1),\
1871 $$(INCLUDE) \
1872 $(EPUBGEN_CFLAGS) \
1874 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1876 endef
1877 gb_ExternalProject__use_epubgen :=
1879 else # !SYSTEM_EPUBGEN
1881 define gb_LinkTarget__use_epubgen
1882 $(call gb_LinkTarget_set_include,$(1),\
1883 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1884 $$(INCLUDE) \
1886 $(call gb_LinkTarget_add_libs,$(1),\
1887 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1889 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1891 endef
1892 define gb_ExternalProject__use_epubgen
1893 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1895 endef
1897 endif # SYSTEM_EPUBGEN
1899 ifneq ($(SYSTEM_REVENGE),)
1901 define gb_LinkTarget__use_revenge
1902 $(call gb_LinkTarget_set_include,$(1),\
1903 $$(INCLUDE) \
1904 $(REVENGE_CFLAGS) \
1906 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1908 endef
1910 gb_ExternalProject__use_revenge :=
1912 else # !SYSTEM_REVENGE
1914 ifeq ($(COM),MSC)
1916 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1917 revenge \
1920 define gb_LinkTarget__use_revenge
1921 $(call gb_LinkTarget_set_include,$(1),\
1922 $(REVENGE_CFLAGS) \
1923 $$(INCLUDE) \
1925 $(call gb_LinkTarget_use_libraries,$(1),\
1926 revenge \
1929 endef
1931 define gb_ExternalProject__use_revenge
1932 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1934 endef
1936 else # !MSC
1938 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1939 librevenge \
1942 define gb_LinkTarget__use_revenge
1943 $(call gb_LinkTarget_use_package,$(1),librevenge)
1945 $(call gb_LinkTarget_set_include,$(1),\
1946 $(REVENGE_CFLAGS) \
1947 -DLIBREVENGE_VISIBILITY \
1948 $$(INCLUDE) \
1950 $(call gb_LinkTarget_add_libs,$(1),\
1951 $(REVENGE_LIBS) \
1953 endef
1955 define gb_ExternalProject__use_revenge
1956 $(call gb_ExternalProject_use_package,$(1),librevenge)
1958 endef
1960 endif # MSC
1962 endif # SYSTEM_REVENGE
1965 ifneq ($(SYSTEM_ABW),)
1967 define gb_LinkTarget__use_abw
1968 $(call gb_LinkTarget_set_include,$(1),\
1969 $$(INCLUDE) \
1970 $(ABW_CFLAGS) \
1972 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1974 endef
1975 gb_ExternalProject__use_abw :=
1977 else # !SYSTEM_ABW
1979 define gb_LinkTarget__use_abw
1980 $(call gb_LinkTarget_set_include,$(1),\
1981 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1982 $$(INCLUDE) \
1984 $(call gb_LinkTarget_add_libs,$(1),\
1985 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1987 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1989 endef
1990 define gb_ExternalProject__use_abw
1991 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1993 endef
1995 endif # SYSTEM_ABW
1998 ifneq ($(SYSTEM_MSPUB),)
2000 define gb_LinkTarget__use_mspub
2001 $(call gb_LinkTarget_set_include,$(1),\
2002 $$(INCLUDE) \
2003 $(MSPUB_CFLAGS) \
2005 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2007 endef
2009 else # !SYSTEM_MSPUB
2011 define gb_LinkTarget__use_mspub
2012 $(call gb_LinkTarget_set_include,$(1),\
2013 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2014 $$(INCLUDE) \
2016 $(call gb_LinkTarget_add_libs,$(1),\
2017 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2019 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2021 endef
2023 endif # SYSTEM_MSPUB
2026 ifneq ($(SYSTEM_PAGEMAKER),)
2028 define gb_LinkTarget__use_pagemaker
2029 $(call gb_LinkTarget_set_include,$(1),\
2030 $$(INCLUDE) \
2031 $(PAGEMAKER_CFLAGS) \
2033 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2035 endef
2036 gb_ExternalProject__use_pagemaker :=
2038 else # !SYSTEM_PAGEMAKER
2040 define gb_LinkTarget__use_pagemaker
2041 $(call gb_LinkTarget_set_include,$(1),\
2042 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2043 $$(INCLUDE) \
2045 $(call gb_LinkTarget_add_libs,$(1),\
2046 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2048 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2050 endef
2051 define gb_ExternalProject__use_pagemaker
2052 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2054 endef
2056 endif # SYSTEM_PAGEMAKER
2059 ifneq ($(SYSTEM_QXP),)
2061 define gb_LinkTarget__use_qxp
2062 $(call gb_LinkTarget_set_include,$(1),\
2063 $$(INCLUDE) \
2064 $(QXP_CFLAGS) \
2066 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2068 endef
2069 gb_ExternalProject__use_qxp :=
2071 else # !SYSTEM_QXP
2073 define gb_LinkTarget__use_qxp
2074 $(call gb_LinkTarget_set_include,$(1),\
2075 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2076 $$(INCLUDE) \
2078 $(call gb_LinkTarget_add_libs,$(1),\
2079 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2081 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2083 endef
2084 define gb_ExternalProject__use_qxp
2085 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2087 endef
2089 endif # SYSTEM_QXP
2092 ifneq ($(SYSTEM_ZMF),)
2094 define gb_LinkTarget__use_zmf
2095 $(call gb_LinkTarget_set_include,$(1),\
2096 $$(INCLUDE) \
2097 $(ZMF_CFLAGS) \
2099 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2101 endef
2102 gb_ExternalProject__use_zmf :=
2104 else # !SYSTEM_ZMF
2106 define gb_LinkTarget__use_zmf
2107 $(call gb_LinkTarget_set_include,$(1),\
2108 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2109 $$(INCLUDE) \
2111 $(call gb_LinkTarget_add_libs,$(1),\
2112 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2114 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2116 endef
2117 define gb_ExternalProject__use_zmf
2118 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2120 endef
2122 endif # SYSTEM_ZMF
2125 ifneq ($(SYSTEM_VISIO),)
2127 define gb_LinkTarget__use_visio
2128 $(call gb_LinkTarget_set_include,$(1),\
2129 $$(INCLUDE) \
2130 $(VISIO_CFLAGS) \
2132 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2134 endef
2136 else # !SYSTEM_VISIO
2138 define gb_LinkTarget__use_visio
2139 $(call gb_LinkTarget_set_include,$(1),\
2140 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2141 $$(INCLUDE) \
2143 $(call gb_LinkTarget_add_libs,$(1),\
2144 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2146 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2148 endef
2150 endif # SYSTEM_VISIO
2153 ifneq ($(SYSTEM_WPD),)
2155 define gb_LinkTarget__use_wpd
2156 $(call gb_LinkTarget_set_include,$(1),\
2157 $$(INCLUDE) \
2158 $(WPD_CFLAGS) \
2160 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2162 endef
2163 gb_ExternalProject__use_wpd :=
2165 else # !SYSTEM_WPD
2167 ifeq ($(COM),MSC)
2169 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2170 wpd \
2173 define gb_LinkTarget__use_wpd
2174 $(call gb_LinkTarget_set_include,$(1),\
2175 $(WPD_CFLAGS) \
2176 $$(INCLUDE) \
2178 $(call gb_LinkTarget_use_libraries,$(1),\
2179 wpd \
2182 endef
2184 define gb_ExternalProject__use_wpd
2185 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2187 endef
2189 else # !MSC
2191 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2192 libwpd \
2195 define gb_LinkTarget__use_wpd
2196 $(call gb_LinkTarget_use_package,$(1),libwpd)
2198 $(call gb_LinkTarget_set_include,$(1),\
2199 $(WPD_CFLAGS) \
2200 $$(INCLUDE) \
2202 $(call gb_LinkTarget_add_libs,$(1),\
2203 $(WPD_LIBS) \
2206 endef
2208 define gb_ExternalProject__use_wpd
2209 $(call gb_ExternalProject_use_package,$(1),libwpd)
2211 endef
2213 endif # MSC
2215 endif # SYSTEM_WPD
2218 ifneq ($(SYSTEM_WPG),)
2220 define gb_LinkTarget__use_wpg
2221 $(call gb_LinkTarget_set_include,$(1),\
2222 $$(INCLUDE) \
2223 $(WPG_CFLAGS) \
2225 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2227 endef
2228 gb_ExternalProject__use_wpg :=
2230 else # !SYSTEM_WPG
2232 ifeq ($(COM),MSC)
2234 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2235 wpg \
2238 define gb_LinkTarget__use_wpg
2239 $(call gb_LinkTarget_set_include,$(1),\
2240 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2241 $$(INCLUDE) \
2243 $(call gb_LinkTarget_use_libraries,$(1),\
2244 wpg \
2247 endef
2249 else # !MSC
2251 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2252 libwpg \
2255 define gb_LinkTarget__use_wpg
2256 $(call gb_LinkTarget_use_package,$(1),libwpg)
2258 $(call gb_LinkTarget_set_include,$(1),\
2259 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2260 $$(INCLUDE) \
2262 $(call gb_LinkTarget_add_libs,$(1),\
2263 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2266 endef
2268 endif # MSC
2270 endif # SYSTEM_WPG
2273 ifneq ($(SYSTEM_WPS),)
2275 define gb_LinkTarget__use_wps
2276 $(call gb_LinkTarget_set_include,$(1),\
2277 $$(INCLUDE) \
2278 $(WPS_CFLAGS) \
2280 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2282 endef
2283 gb_ExternalProject__use_wps :=
2285 else # !SYSTEM_WPS
2287 ifeq ($(COM),MSC)
2289 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2290 wps \
2293 define gb_LinkTarget__use_wps
2294 $(call gb_LinkTarget_set_include,$(1),\
2295 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2296 $$(INCLUDE) \
2299 $(call gb_LinkTarget_use_libraries,$(1),\
2300 wps \
2303 endef
2305 else # !MSC
2307 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2308 libwps \
2311 define gb_LinkTarget__use_wps
2312 $(call gb_LinkTarget_use_package,$(1),libwps)
2314 $(call gb_LinkTarget_set_include,$(1),\
2315 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2316 $$(INCLUDE) \
2318 $(call gb_LinkTarget_add_libs,$(1),\
2319 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2322 endef
2324 endif # MSC
2326 endif # SYSTEM_WPS
2329 ifneq ($(SYSTEM_MWAW),)
2331 define gb_LinkTarget__use_mwaw
2332 $(call gb_LinkTarget_set_include,$(1),\
2333 $$(INCLUDE) \
2334 $(MWAW_CFLAGS) \
2336 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2338 endef
2340 else # !SYSTEM_MWAW
2342 ifeq ($(COM),MSC)
2344 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2345 mwaw \
2348 define gb_LinkTarget__use_mwaw
2349 $(call gb_LinkTarget_set_include,$(1),\
2350 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2351 $$(INCLUDE) \
2354 $(call gb_LinkTarget_use_libraries,$(1),\
2355 mwaw \
2358 endef
2360 else # !MSC
2362 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2363 libmwaw \
2366 define gb_LinkTarget__use_mwaw
2367 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2369 $(call gb_LinkTarget_set_include,$(1),\
2370 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2371 $$(INCLUDE) \
2373 $(call gb_LinkTarget_add_libs,$(1),\
2374 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2377 endef
2379 endif # MSC
2381 endif # SYSTEM_MWAW
2383 ifneq ($(SYSTEM_STAROFFICE),)
2385 define gb_LinkTarget__use_staroffice
2386 $(call gb_LinkTarget_set_include,$(1),\
2387 $$(INCLUDE) \
2388 $(STAROFFICE_CFLAGS) \
2390 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2392 endef
2394 else # !SYSTEM_STAROFFICE
2396 ifeq ($(COM),MSC)
2398 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2399 staroffice \
2402 define gb_LinkTarget__use_staroffice
2403 $(call gb_LinkTarget_set_include,$(1),\
2404 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2405 $$(INCLUDE) \
2408 $(call gb_LinkTarget_use_libraries,$(1),\
2409 staroffice \
2412 endef
2414 else # !MSC
2416 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2417 libstaroffice \
2420 define gb_LinkTarget__use_staroffice
2421 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2423 $(call gb_LinkTarget_set_include,$(1),\
2424 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2425 $$(INCLUDE) \
2427 $(call gb_LinkTarget_add_libs,$(1),\
2428 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2431 endef
2433 endif # MSC
2435 endif # SYSTEM_STAROFFICE
2438 ifneq ($(SYSTEM_LCMS2),)
2440 define gb_LinkTarget__use_lcms2
2441 $(call gb_LinkTarget_set_include,$(1),\
2442 $$(INCLUDE) \
2443 $(LCMS2_CFLAGS) \
2445 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2447 endef
2449 gb_ExternalProject__use_lcms2 :=
2451 else # !SYSTEM_LCMS2
2453 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2454 lcms2 \
2457 define gb_ExternalProject__use_lcms2
2458 $(call gb_ExternalProject_use_package,$(1),lcms2)
2460 endef
2462 ifeq ($(OS),ANDROID)
2464 define gb_LinkTarget__use_lcms2
2465 $(call gb_LinkTarget_use_package,$(1),lcms2)
2466 $(call gb_LinkTarget_set_include,$(1),\
2467 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2468 $$(INCLUDE) \
2471 endef
2473 else
2475 define gb_LinkTarget__use_lcms2
2476 $(call gb_LinkTarget_use_package,$(1),lcms2)
2477 $(call gb_LinkTarget_set_include,$(1),\
2478 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2479 $$(INCLUDE) \
2481 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2483 endef
2485 endif # ANDROID
2486 endif # SYSTEM_LCMS2
2488 ifneq ($(ENABLE_LPSOLVE),)
2490 ifneq ($(SYSTEM_LPSOLVE),)
2492 define gb_LinkTarget__use_lpsolve
2493 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2494 $(call gb_LinkTarget_add_defs,$(1),\
2495 -DSYSTEM_LPSOLVE \
2498 endef
2500 else # !SYSTEM_LPSOLVE
2502 define gb_LinkTarget__use_lpsolve
2503 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2504 ifeq ($(COM),MSC)
2505 $(call gb_LinkTarget_add_libs,$(1),\
2506 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2508 else
2509 $(call gb_LinkTarget_add_libs,$(1),\
2510 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2512 endif
2513 $(call gb_LinkTarget_set_include,$(1),\
2514 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2515 $$(INCLUDE) \
2518 endef
2520 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2521 lpsolve \
2524 endif # SYSTEM_LPSOLVE
2526 else
2528 gb_LinkTarget__use_lpsolve :=
2530 endif # ENABLE_LPSOLVE
2532 ifneq ($(ENABLE_COINMP),)
2534 ifneq ($(SYSTEM_COINMP),TRUE)
2536 define gb_LinkTarget__use_coinmp
2537 $(call gb_LinkTarget_use_package,$(1),coinmp)
2538 ifeq ($(COM),MSC)
2539 $(call gb_LinkTarget_add_libs,$(1),\
2540 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2542 else
2543 $(call gb_LinkTarget_add_libs,$(1),\
2544 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2545 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2546 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2547 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2548 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2549 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2550 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2552 endif
2553 $(call gb_LinkTarget_set_include,$(1),\
2554 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2555 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2556 $$(INCLUDE) \
2559 endef
2561 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2562 coinmp \
2565 else # SYSTEM_COINMP
2567 define gb_LinkTarget__use_coinmp
2568 $(call gb_LinkTarget_set_include,$(1),\
2569 $$(INCLUDE) \
2570 $(COINMP_CFLAGS) \
2572 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2574 endef
2576 endif
2578 else
2580 gb_LinkTarget__use_coinmp :=
2582 endif # ENABLE_COINMP
2584 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2586 define gb_LinkTarget__use_mDNSResponder
2587 $(call gb_LinkTarget_set_include,$(1),\
2588 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2589 $$(INCLUDE) \
2591 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2592 endef
2594 endif # MDNSRESPONDER
2596 ifeq ($(ENABLE_GIO),TRUE)
2598 define gb_LinkTarget__use_gio
2599 $(call gb_LinkTarget_set_include,$(1),\
2600 $$(INCLUDE) \
2601 $(GIO_CFLAGS) \
2604 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2606 endef
2608 else # ENABLE_GIO
2610 define gb_LinkTarget__use_gio
2612 endef
2614 endif # ENABLE_GIO
2616 ifeq ($(ENABLE_AVAHI),TRUE)
2618 define gb_LinkTarget__use_avahi
2619 $(call gb_LinkTarget_set_include,$(1),\
2620 $$(INCLUDE) \
2621 $(AVAHI_CFLAGS) \
2624 $(call gb_LinkTarget_add_defs,$(1),\
2625 -DENABLE_AVAHI \
2628 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2630 endef
2632 else # ENABLE_AVAHI
2634 gb_LinkTarget__use_avahi :=
2636 endif # ENABLE_AVAHI
2638 ifeq ($(ENABLE_CUPS),TRUE)
2640 define gb_LinkTarget__use_cups
2641 $(call gb_LinkTarget_add_defs,$(1),\
2642 -DENABLE_CUPS \
2645 $(call gb_LinkTarget_add_libs,$(1),\
2646 -lcups \
2649 endef
2651 else # ENABLE_CUPS
2653 define gb_LinkTarget__use_cups
2655 endef
2657 endif # ENABLE_CUPS
2659 ifeq ($(ENABLE_DBUS),TRUE)
2661 define gb_LinkTarget__use_dbus
2662 $(call gb_LinkTarget_set_include,$(1),\
2663 $$(INCLUDE) \
2664 $(DBUS_CFLAGS) \
2667 $(call gb_LinkTarget_add_libs,$(1),\
2668 $(DBUS_LIBS) \
2671 endef
2673 else # ENABLE_DBUS
2675 define gb_LinkTarget__use_dbus
2677 endef
2679 endif # ENABLE_DBUS
2682 ifneq ($(SYSTEM_LIBPNG),)
2684 define gb_LinkTarget__use_libpng
2685 $(call gb_LinkTarget_set_include,$(1),\
2686 $$(INCLUDE) \
2687 $(LIBPNG_CFLAGS) \
2690 $(call gb_LinkTarget_add_libs,$(1),\
2691 $(LIBPNG_LIBS) \
2694 endef
2696 gb_ExternalProject__use_libpng :=
2698 else # !SYSTEM_LIBPNG
2700 define gb_LinkTarget__use_libpng
2701 $(call gb_LinkTarget_set_include,$(1),\
2702 $(LIBPNG_CFLAGS) \
2703 $$(INCLUDE) \
2705 $(call gb_LinkTarget_use_static_libraries,$(1),\
2706 libpng \
2708 $(call gb_LinkTarget__use_zlib,$(1))
2710 endef
2712 define gb_ExternalProject__use_libpng
2713 $(call gb_ExternalProject_use_static_libraries,$(1),\
2714 libpng \
2717 endef
2719 endif # !SYSTEM_LIBPNG
2722 ifneq ($(SYSTEM_CURL),)
2724 define gb_LinkTarget__use_curl
2725 $(call gb_LinkTarget_add_defs,$(1),\
2726 -DSYSTEM_CURL \
2728 $(call gb_LinkTarget_set_include,$(1),\
2729 $$(INCLUDE) \
2730 $(CURL_CFLAGS) \
2732 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2734 endef
2736 else # !SYSTEM_CURL
2738 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2739 curl \
2742 define gb_LinkTarget__use_curl
2743 $(call gb_LinkTarget_use_package,$(1),curl)
2744 $(call gb_LinkTarget_set_include,$(1),\
2745 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2746 $$(INCLUDE) \
2749 ifeq ($(COM),MSC)
2750 $(call gb_LinkTarget_add_libs,$(1),\
2751 $(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 \
2753 else
2754 $(call gb_LinkTarget_add_libs,$(1),\
2755 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2757 endif
2759 endef
2761 endif # SYSTEM_CURL
2763 ifeq ($(ENABLE_VALGRIND),TRUE)
2765 define gb_LinkTarget__use_valgrind
2766 $(call gb_LinkTarget_add_defs,$(1),\
2767 -DHAVE_VALGRIND_HEADERS \
2770 $(call gb_LinkTarget_set_include,$(1),\
2771 $$(INCLUDE) \
2772 $(VALGRIND_CFLAGS) \
2775 endef
2777 else # !ENABLE_VALGRIND
2779 define gb_LinkTarget__use_valgrind
2781 endef
2783 endif # ENABLE_VALGRIND
2785 ifeq ($(ENABLE_POPPLER),TRUE)
2787 ifneq ($(SYSTEM_POPPLER),)
2789 define gb_LinkTarget__use_poppler
2790 $(call gb_LinkTarget_set_include,$(1),\
2791 $(POPPLER_CFLAGS) \
2792 $$(INCLUDE) \
2795 $(call gb_LinkTarget_add_libs,$(1),\
2796 $(POPPLER_LIBS) \
2799 endef
2801 else # !SYSTEM_POPPLER
2803 define gb_LinkTarget__use_poppler
2804 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2806 $(call gb_LinkTarget_set_include,$(1),\
2807 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2808 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2809 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2810 $$(INCLUDE) \
2813 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2815 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2817 ifeq ($(OS),MACOSX)
2818 $(call gb_LinkTarget_add_libs,$(1),\
2819 -lobjc \
2821 else ifeq ($(OS),LINUX)
2822 $(call gb_LinkTarget_add_libs,$(1),\
2823 -pthread \
2825 else ifeq ($(OS),WNT)
2826 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2827 advapi32 \
2828 gdi32 \
2830 endif
2832 endef
2834 endif # SYSTEM_POPPLER
2836 endif # ENABLE_POPPLER
2839 ifneq ($(SYSTEM_CLUCENE),)
2841 define gb_LinkTarget__use_clucene
2842 $(call gb_LinkTarget_add_defs,$(1),\
2843 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2846 $(call gb_LinkTarget_set_include,$(1),\
2847 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2848 $$(INCLUDE) \
2851 $(call gb_LinkTarget_add_libs,$(1),\
2852 $(CLUCENE_LIBS) \
2855 endef
2857 else # !SYSTEM_CLUCENE
2859 define gb_LinkTarget__use_clucene
2860 $(call gb_LinkTarget_set_include,$(1),\
2861 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2862 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2863 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2864 $$(INCLUDE) \
2867 $(call gb_LinkTarget_use_libraries,$(1),\
2868 clucene \
2871 endef
2873 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2874 clucene \
2877 endif # SYSTEM_CLUCENE
2879 define gb_LinkTarget__use_gobject
2880 $(call gb_LinkTarget_add_libs,$(1),\
2881 $(GOBJECT_LIBS) \
2884 $(call gb_LinkTarget_set_include,$(1),\
2885 $$(INCLUDE) \
2886 $(GOBJECT_CFLAGS) \
2888 endef
2890 ifneq ($(SYSTEM_HSQLDB),)
2892 define gb_LinkTarget__use_hsqldb
2894 $(call gb_LinkTarget_add_defs,$(1),\
2895 -DSYSTEM_HSQLDB \
2896 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2899 endef
2901 else # !SYSTEM_HSQLDB
2903 define gb_LinkTarget__use_hsqldb
2905 endef
2907 endif # SYSTEM_HSQLDB
2909 ifeq ($(ENABLE_LDAP),TRUE)
2910 ifneq ($(SYSTEM_OPENLDAP),)
2912 define gb_LinkTarget__use_openldap
2914 $(call gb_LinkTarget_add_libs,$(1),\
2915 -lldap \
2916 -llber \
2919 endef
2921 gb_ExternalProject__use_openldap :=
2923 else # !SYSTEM_OPENLDAP
2925 define gb_LinkTarget__use_openldap
2926 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2927 $(call gb_LinkTarget_set_include,$(1),\
2928 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2929 $$(INCLUDE) \
2931 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2932 $(call gb_LinkTarget_add_libs,$(1), \
2933 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2934 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2937 endef
2938 endif
2940 define gb_ExternalProject__use_openldap
2941 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2943 endef
2945 endif # SYSTEM_OPENLDAP
2947 ifneq ($(SYSTEM_LIBTOMMATH),)
2949 define gb_LinkTarget__use_libtommath
2950 $(call gb_LinkTarget_set_include,$(1),\
2951 $(LIBTOMMATH_CFLAGS) \
2952 $$(INCLUDE) \
2954 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2956 endef
2958 else # !SYSTEM_LIBTOMMATH
2959 define gb_LinkTarget__use_libtommath
2960 $(call gb_LinkTarget_set_include,$(1),\
2961 -I${WORKDIR}/UnpackedTarball/libtommath \
2962 $$(INCLUDE) \
2964 $(call gb_LinkTarget_add_libs,$(1),\
2965 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2967 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2969 endef
2971 endif # SYSTEM_LIBTOMMATH
2973 define gb_ExternalProject__use_libtommath
2974 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2976 endef
2978 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2980 ifneq ($(SYSTEM_FIREBIRD),)
2982 define gb_LinkTarget__use_libfbembed
2983 $(call gb_LinkTarget_set_include,$(1),\
2984 $(FIREBIRD_CFLAGS) \
2985 $$(INCLUDE) \
2987 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2989 endef
2991 else # !SYSTEM_FIREBIRD
2993 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2994 firebird \
2997 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2998 #$(call gb_LinkTarget__use_libtommath,$(1))
3000 define gb_LinkTarget__use_libfbembed
3001 $(call gb_LinkTarget_use_package,$(1),firebird)
3002 $(call gb_LinkTarget_set_include,$(1),\
3003 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3004 $$(INCLUDE) \
3006 ifeq ($(COM),MSC)
3007 $(call gb_LinkTarget_add_libs,$(1),\
3008 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3010 else
3011 $(call gb_LinkTarget_add_libs,$(1),\
3012 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3014 endif
3016 endef
3019 # endef
3021 endif # SYSTEM_FIREBIRD
3023 else # !ENABLE_FIREBIRD_SDBC
3025 gb_LinkTarget__use_firebird :=
3026 # gb_LinkTarget__use_atomic_ops :=
3027 # gb_LinkTarget__use_libtommath :=
3029 endif # ENABLE_FIREBIRD_SDBC
3032 ifneq ($(SYSTEM_POSTGRESQL),)
3034 define gb_LinkTarget__use_postgresql
3036 $(call gb_LinkTarget_set_include,$(1),\
3037 $(POSTGRESQL_INC) \
3038 $$(INCLUDE) \
3041 $(call gb_LinkTarget_add_libs,$(1),\
3042 -lpq \
3045 $(call gb_LinkTarget_add_ldflags,$(1),\
3046 $(POSTGRESQL_LIB) \
3049 endef
3051 else # !SYSTEM_POSTGRESQL
3053 ifeq ($(OS),WNT)
3054 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3055 postgresql \
3057 endif # WNT
3059 define gb_LinkTarget__use_postgresql
3061 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
3063 $(call gb_LinkTarget_set_include,$(1),\
3064 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3065 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3066 $$(INCLUDE) \
3069 ifeq ($(OS),WNT)
3071 $(call gb_LinkTarget_add_libs,$(1),\
3072 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3075 else # WNT
3077 $(call gb_LinkTarget_add_libs,$(1),\
3078 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3079 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3080 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
3083 endif # WNT
3085 endef
3087 endif # SYSTEM_POSTGRESQL
3089 ifeq ($(ENABLE_KF5),TRUE)
3091 define gb_LinkTarget__use_kf5
3092 $(call gb_LinkTarget_set_include,$(1),\
3093 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3094 $$(INCLUDE) \
3097 $(call gb_LinkTarget_add_cxxflags,$(1),\
3098 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3101 $(call gb_LinkTarget_add_libs,$(1),\
3102 $(KF5_LIBS) \
3105 endef
3107 else # !ENABLE_KF5
3109 define gb_LinkTarget__use_kf5
3111 endef
3113 endif # ENABLE_KF5
3117 ifeq ($(ENABLE_QT5),TRUE)
3119 define gb_LinkTarget__use_qt5
3120 $(call gb_LinkTarget_set_include,$(1),\
3121 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3122 $$(INCLUDE) \
3125 $(call gb_LinkTarget_add_defs,$(1),\
3126 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3129 $(call gb_LinkTarget_add_libs,$(1),\
3130 $(QT5_LIBS) \
3133 endef
3135 else # !ENABLE_QT5
3137 define gb_LinkTarget__use_qt5
3139 endef
3141 endif # ENABLE_QT5
3143 # PYTHON
3144 # extra python_headers external because pyuno wrapper must not link python
3145 ifneq ($(SYSTEM_PYTHON),)
3147 define gb_LinkTarget__use_python_headers
3148 $(call gb_LinkTarget_add_defs,$(1),\
3149 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3152 $(call gb_LinkTarget_set_include,$(1),\
3153 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3154 $$(INCLUDE) \
3157 endef
3159 define gb_LinkTarget__use_python
3160 $(call gb_LinkTarget__use_python_headers,$(1))
3162 $(call gb_LinkTarget_add_libs,$(1),\
3163 $(PYTHON_LIBS) \
3166 endef
3168 else # !SYSTEM_PYTHON
3170 $(eval $(call gb_Helper_register_packages_for_install,python,\
3171 python3 \
3172 $(if $(filter WNT,$(OS)),libffi) \
3175 define gb_LinkTarget__use_python_headers
3176 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3177 $(call gb_LinkTarget_set_include,$(1),\
3178 -I$(call gb_UnpackedTarball_get_dir,python3) \
3179 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3180 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3181 $$(INCLUDE) \
3184 endef
3186 define gb_LinkTarget__use_python
3187 $(call gb_LinkTarget__use_python_headers,$(1))
3188 ifeq ($(OS),MACOSX)
3189 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3190 else
3191 $(call gb_LinkTarget_use_package,$(1),python3)
3192 endif
3194 ifeq ($(OS),WNT)
3195 ifeq ($(CPUNAME),X86_64)
3196 python_arch_subdir=amd64
3197 else ifeq ($(CPUNAME),ARM64)
3198 python_arch_subdir=arm64
3199 else
3200 python_arch_subdir=win32
3201 endif
3202 $(call gb_LinkTarget_add_libs,$(1),\
3203 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3205 else ifeq ($(OS),MACOSX)
3206 $(call gb_LinkTarget_add_libs,$(1),\
3207 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3209 else
3210 $(call gb_LinkTarget_add_libs,$(1),\
3211 -L$(call gb_UnpackedTarball_get_dir,python3) \
3212 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3214 endif
3216 endef
3218 # this is only used by python currently
3219 define gb_ExternalProject__use_libffi
3220 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3222 endef
3224 endif # SYSTEM_PYTHON
3226 # ORCUS
3227 ifneq ($(SYSTEM_LIBORCUS),)
3229 define gb_LinkTarget__use_orcus
3230 $(call gb_LinkTarget_set_include,$(1),\
3231 $$(INCLUDE) \
3232 $(ORCUS_CFLAGS) \
3234 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3235 endef
3237 define gb_LinkTarget__use_orcus-parser
3239 endef
3241 else # !SYSTEM_LIBORCUS
3243 ifeq ($(COM),MSC)
3245 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3246 orcus \
3247 orcus-parser \
3250 define gb_LinkTarget__use_orcus
3251 $(call gb_LinkTarget_set_include,$(1),\
3252 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3253 $$(INCLUDE) \
3256 $(call gb_LinkTarget_use_libraries,$(1),\
3257 orcus \
3260 endef
3262 define gb_LinkTarget__use_orcus-parser
3263 $(call gb_LinkTarget_set_include,$(1),\
3264 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3265 $$(INCLUDE) \
3268 $(call gb_LinkTarget_use_libraries,$(1),\
3269 orcus-parser \
3272 endef
3274 else # !MSC
3276 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3277 liborcus \
3280 define gb_LinkTarget__use_orcus
3281 $(call gb_LinkTarget_use_package,$(1),liborcus)
3283 $(call gb_LinkTarget_set_include,$(1),\
3284 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3285 $$(INCLUDE) \
3288 $(call gb_LinkTarget_add_libs,$(1),\
3289 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.16 \
3292 $(if $(SYSTEM_BOOST), \
3293 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3294 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3297 endef
3299 define gb_LinkTarget__use_orcus-parser
3300 $(call gb_LinkTarget_use_package,$(1),liborcus)
3302 $(call gb_LinkTarget_set_include,$(1),\
3303 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3304 $$(INCLUDE) \
3307 $(call gb_LinkTarget_add_libs,$(1),\
3308 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.16 \
3311 endef
3313 endif # MSC
3315 endif # SYSTEM_LIBORCUS
3317 ifeq ($(ENABLE_EOT),TRUE)
3319 ifneq ($(SYSTEM_LIBEOT),)
3321 define gb_LinkTarget__use_libeot
3322 $(call gb_LinkTarget_set_include,$(1),\
3323 $$(INCLUDE) \
3324 $(LIBEOT_CFLAGS) \
3326 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3328 endef
3330 gb_ExternalProject__use_libeot :=
3332 else # !SYSTEM_LIBEOT
3334 define gb_LinkTarget__use_libeot
3335 $(call gb_LinkTarget_set_include,$(1),\
3336 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3337 $$(INCLUDE) \
3339 $(call gb_LinkTarget_add_libs,$(1),\
3340 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3342 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3344 endef
3346 define gb_ExternalProject__use_libeot
3347 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3349 endef
3351 endif # SYSTEM_LIBEOT
3353 else # !ENABLE_EOT
3355 gb_LinkTarget__use_libeot :=
3356 gb_ExternalProject__use_libeot :=
3358 endif # ENABLE_EOT
3360 ### X11 stuff ###
3362 ifeq ($(USING_X11), TRUE)
3364 define gb_LinkTarget__use_Xrandr
3365 $(call gb_LinkTarget_set_include,$(1),\
3366 $$(INCLUDE) \
3367 $(XRANDR_CFLAGS) \
3370 $(call gb_LinkTarget_add_libs,$(1),\
3371 $(XRANDR_LIBS) \
3373 endef
3375 define gb_LinkTarget__use_Xrender
3376 $(call gb_LinkTarget_set_include,$(1),\
3377 $$(INCLUDE) \
3378 $(XRENDER_CFLAGS) \
3381 $(call gb_LinkTarget_add_libs,$(1),\
3382 $(XRENDER_LIBS) \
3384 endef
3386 endif # USING_X11
3389 gb_ExternalProject__use_nss3:=
3392 ifneq ($(SYSTEM_NSS),)
3394 define gb_LinkTarget__use_nss3
3395 $(call gb_LinkTarget_add_defs,$(1),\
3396 -DSYSTEM_NSS \
3399 $(call gb_LinkTarget_set_include,$(1),\
3400 $$(INCLUDE) \
3401 $(NSS_CFLAGS) \
3404 $(call gb_LinkTarget_add_libs,$(1),\
3405 $(NSS_LIBS) \
3408 endef
3410 define gb_LinkTarget__use_plc4
3411 $(call gb_LinkTarget__use_nss3,$(1))
3413 endef
3415 define gb_LinkTarget__use_ssl3
3416 $(call gb_LinkTarget__use_nss3,$(1))
3418 endef
3420 else # !SYSTEM_NSS
3422 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3423 nss \
3426 define gb_LinkTarget__use_nss3
3427 $(call gb_LinkTarget_use_package,$(1),nss)
3428 $(call gb_LinkTarget_set_include,$(1),\
3429 $$(INCLUDE) \
3430 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3431 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3434 ifeq ($(COM),MSC)
3435 $(call gb_LinkTarget_add_libs,$(1),\
3436 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3437 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3438 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3440 else
3441 $(call gb_LinkTarget_add_libs,$(1),\
3442 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3443 -lnspr4 \
3444 -lnss3 \
3445 -lsmime3 \
3447 endif
3449 endef
3451 define gb_LinkTarget__use_plc4
3452 $(call gb_LinkTarget_use_package,$(1),nss)
3453 ifeq ($(COM),MSC)
3454 $(call gb_LinkTarget_add_libs,$(1),\
3455 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3457 else
3458 $(call gb_LinkTarget_add_libs,$(1),\
3459 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3461 endif
3463 endef
3465 define gb_LinkTarget__use_ssl3
3466 $(call gb_LinkTarget_use_package,$(1),nss)
3467 ifeq ($(COM),MSC)
3468 $(call gb_LinkTarget_add_libs,$(1),\
3469 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3471 else
3472 $(call gb_LinkTarget_add_libs,$(1),\
3473 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3475 endif
3477 endef
3479 define gb_ExternalProject__use_nss3
3480 $(call gb_ExternalProject_use_package,$(1),nss)
3482 endef
3484 endif # SYSTEM_NSS
3486 ifeq ($(ENABLE_BREAKPAD),TRUE)
3488 define gb_LinkTarget__use_breakpad
3489 $(call gb_LinkTarget_set_include,$(1),\
3490 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3491 $$(INCLUDE) \
3494 ifeq ($(COM),MSC)
3495 $(call gb_LinkTarget_use_static_libraries,$(1),\
3496 breakpad \
3498 else
3499 $(call gb_LinkTarget_add_libs,$(1),\
3500 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3502 endif
3504 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3506 endef
3508 endif # ENABLE_BREAKPAD
3510 ifeq ($(ENABLE_GPGMEPP),TRUE)
3512 ifneq ($(SYSTEM_GPGMEPP),)
3514 gb_ExternalProject__use_gpgmepp:=
3515 gb_ExternalProject__use_libassuan:=
3516 gb_ExternalProject__use_libgpg-error:=
3518 define gb_LinkTarget__use_gpgmepp
3519 $(call gb_LinkTarget_set_include,$(1),\
3520 $$(INCLUDE) \
3521 $$(GPGMEPP_CFLAGS) \
3524 $(call gb_LinkTarget_add_libs,$(1),\
3525 $(GPGMEPP_LIBS) \
3528 endef
3530 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3532 define gb_ExternalProject__use_gpgmepp
3533 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3535 endef
3536 define gb_ExternalProject__use_libassuan
3537 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3539 endef
3540 define gb_ExternalProject__use_libgpg-error
3541 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3543 endef
3545 ifneq ($(filter WNT,$(OS)),)
3547 define gb_LinkTarget__use_libgpg-error
3548 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3550 $(call gb_LinkTarget_set_include,$(1),\
3551 $(GPG_ERROR_CFLAGS) \
3552 $$(INCLUDE) \
3554 $(call gb_LinkTarget_add_libs,$(1),\
3555 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3558 endef
3560 define gb_LinkTarget__use_libassuan
3561 $(call gb_LinkTarget_use_package,$(1),libassuan)
3563 $(call gb_LinkTarget_set_include,$(1),\
3564 $(LIBASSUAN_CFLAGS) \
3565 $$(INCLUDE) \
3567 $(call gb_LinkTarget_add_libs,$(1),\
3568 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3571 endef
3573 define gb_LinkTarget__use_gpgmepp
3574 $(call gb_LinkTarget_set_include,$(1),\
3575 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3576 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3577 $$(GPG_ERROR_CFLAGS) \
3578 $$(INCLUDE) \
3580 $(call gb_LinkTarget_use_libraries,$(1),\
3581 gpgmepp \
3584 endef
3586 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3587 gpgmepp \
3588 libassuan \
3589 libgpg-error \
3592 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3593 gpgmepp \
3596 endif
3598 ifneq ($(filter MACOSX LINUX,$(OS)),)
3600 define gb_LinkTarget__use_gpgmepp
3601 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3603 $(call gb_LinkTarget_set_include,$(1),\
3604 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3605 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3606 $$(GPG_ERROR_CFLAGS) \
3607 $$(INCLUDE) \
3609 $(call gb_LinkTarget_add_libs,$(1),\
3610 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3611 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3612 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3613 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3616 endef
3618 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3619 gpgmepp \
3620 libassuan \
3621 libgpg-error \
3624 endif
3626 endif
3628 else # !ENABLE_GPGMEPP
3630 gb_ExternalProject__use_gpgmepp :=
3631 gb_ExternalProject__use_libassuan :=
3632 gb_ExternalProject__use_libgpg-error :=
3634 gb_LinkTarget__use_gpgmepp :=
3635 gb_LinkTarget__use_libassuan :=
3636 gb_LinkTarget__use_libgpg-error :=
3638 endif # ENABLE_GPGMEPP
3640 define gb_LinkTarget__use_dconf
3641 $(call gb_LinkTarget_set_include,$(1),\
3642 $$(INCLUDE) \
3643 $(DCONF_CFLAGS) \
3646 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3647 endef
3649 ### Jars ############################################################
3651 ifneq ($(SYSTEM_HSQLDB),)
3653 define gb_Jar__use_hsqldb
3654 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3655 endef
3656 define gb_JunitTest__use_hsqldb
3657 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3658 endef
3660 else # !SYSTEM_HSQLDB
3662 ifeq ($(ENABLE_JAVA),TRUE)
3663 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3664 hsqldb \
3666 endif
3668 define gb_Jar__use_hsqldb
3669 $(call gb_Jar_use_jar,$(1),hsqldb)
3670 endef
3671 define gb_JunitTest__use_hsqldb
3672 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3673 endef
3675 endif # SYSTEM_HSQLDB
3678 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3680 ifneq ($(SYSTEM_BSH),)
3682 define gb_Jar__use_bsh
3683 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3684 endef
3686 else # !SYSTEM_BSH
3688 ifeq ($(ENABLE_JAVA),TRUE)
3689 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3690 bsh \
3692 endif
3694 define gb_Jar__use_bsh
3695 $(call gb_Jar_use_jar,$(1),bsh)
3696 endef
3698 endif # SYSTEM_BSH
3700 endif
3702 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3704 ifneq ($(SYSTEM_RHINO),)
3706 define gb_Jar__use_rhino
3707 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3708 endef
3710 else # !SYSTEM_RHINO
3712 ifeq ($(ENABLE_JAVA),TRUE)
3713 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3714 js \
3716 endif
3718 define gb_Jar__use_rhino
3719 $(call gb_Jar_use_jar,$(1),js)
3720 endef
3722 endif # SYSTEM_RHINO
3724 endif
3726 ifneq ($(SYSTEM_APACHE_COMMONS),)
3728 define gb_Jar__use_commons-logging
3729 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3730 endef
3731 gb_ExternalProject__use_commons-logging :=
3733 else # !SYSTEM_APACHE_COMMONS
3735 ifeq ($(ENABLE_JAVA),TRUE)
3736 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3737 commons-logging-$(COMMONS_LOGGING_VERSION) \
3739 endif
3741 define gb_Jar__use_commons-logging
3742 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3743 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3744 endef
3745 define gb_ExternalProject__use_commons-logging
3746 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3747 endef
3749 endif # SYSTEM_APACHE_COMMONS
3752 ifneq ($(SYSTEM_JFREEREPORT),)
3754 define gb_Jar__use_flow-engine
3755 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3756 endef
3758 define gb_Jar__use_flute
3759 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3760 endef
3762 define gb_Jar__use_libbase
3763 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3764 endef
3766 define gb_Jar__use_libfonts
3767 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3768 endef
3770 define gb_Jar__use_libformula
3771 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3772 endef
3774 define gb_Jar__use_liblayout
3775 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3776 endef
3778 define gb_Jar__use_libloader
3779 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3780 endef
3782 define gb_Jar__use_librepository
3783 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3784 endef
3786 define gb_Jar__use_libserializer
3787 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3788 endef
3790 define gb_Jar__use_libxml
3791 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3792 endef
3794 define gb_Jar__use_sac
3795 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3796 endef
3798 else # !SYSTEM_JFREEREPORT
3800 ifeq ($(ENABLE_JAVA),TRUE)
3801 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3802 flow-engine \
3803 flute-1.1.6 \
3804 libbase-1.1.6 \
3805 libfonts-1.1.6 \
3806 libformula-1.1.7 \
3807 liblayout \
3808 libloader-1.1.6 \
3809 librepository-1.1.6 \
3810 libserializer-1.1.6 \
3811 libxml-1.1.7 \
3812 sac \
3814 endif
3816 define gb_Jar__use_flow-engine
3817 $(call gb_Jar_use_jar,$(1),flow-engine)
3818 endef
3820 define gb_Jar__use_flute
3821 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3822 endef
3824 define gb_Jar__use_libbase
3825 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3826 endef
3828 define gb_Jar__use_libfonts
3829 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3830 endef
3832 define gb_Jar__use_libformula
3833 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3834 endef
3836 define gb_Jar__use_liblayout
3837 $(call gb_Jar_use_jar,$(1),liblayout)
3838 endef
3840 define gb_Jar__use_libloader
3841 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3842 endef
3844 define gb_Jar__use_librepository
3845 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3846 endef
3848 define gb_Jar__use_libserializer
3849 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3850 endef
3852 define gb_Jar__use_libxml
3853 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3854 endef
3856 define gb_Jar__use_sac
3857 $(call gb_Jar_use_jar,$(1),sac)
3858 endef
3860 endif # SYSTEM_JFREEREPORT
3863 # Executables
3865 # FIXME: the library target should be for build too
3866 define gb_Executable__register_bestreversemap
3867 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3868 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3870 endef
3872 # TODO depending on the whole URE might be overkill, but I do not have a
3873 # Windows machine to debug it...
3874 # FIXME: the library target should be for build too
3875 define gb_Executable__register_climaker
3876 $(call gb_Executable_add_runtime_dependencies,climaker,\
3877 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3878 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3879 $(call gb_UnoApi_get_target,udkapi) \
3880 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3882 endef
3884 define gb_Executable__register_cppumaker
3885 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3886 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3888 endef
3890 # This is used to determine what we need for 'build' platform.
3891 # FIXME: the library target should be for build too
3892 define gb_Executable__register_gengal
3893 $(call gb_Executable_add_runtime_dependencies,gengal,\
3894 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3895 $(if $(filter MACOSX,$(OS)),$(call gb_Library_get_target,vclplug_osx)) \
3896 $(if $(filter WNT,$(OS)),$(call gb_Library_get_target,vclplug_win)) \
3897 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3898 $(call gb_Package_get_target_for_build,postprocess_registry) \
3899 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3900 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3901 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3902 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3903 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3904 $(call gb_UnoApi_get_target,offapi) \
3905 $(call gb_UnoApi_get_target,udkapi) \
3907 endef
3909 ifeq ($(SYSTEM_ICU),)
3911 define gb_Executable__register_gendict
3912 $(call gb_Executable_add_runtime_dependencies,gendict,\
3913 $(call gb_Package_get_target_for_build,icu) \
3914 $(call gb_Package_get_target_for_build,icu_ure) \
3916 endef
3918 endif
3920 define gb_Executable__register_idlc
3921 $(call gb_Executable_add_runtime_dependencies,idlc,\
3922 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3924 endef
3926 define gb_Executable__register_localize
3927 $(call gb_Executable_add_runtime_dependencies,localize,\
3928 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3929 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3932 endef
3934 # FIXME ure/services.rdb needs cleanup
3935 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3936 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3937 # FIXME: the library target should be for build too
3938 define gb_Executable__register_saxparser
3939 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3940 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3941 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3942 $(call gb_Rdb_get_target_for_build,saxparser) \
3943 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3944 $(call gb_UnoApi_get_target,udkapi) \
3946 endef
3948 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3949 # required due to the settings for URE_SERVICES and URE_TYPES in
3950 # cppuhelper/source/unorc
3951 # FIXME: the library target should be for build too
3952 define gb_Executable__register_uno
3953 $(call gb_Executable_add_runtime_dependencies,uno,\
3954 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3955 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3956 $(call gb_UnoApi_get_target,udkapi) \
3958 endef
3961 # External executables
3963 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3965 gb_ExternalExecutable__register_xmllint :=
3967 else # ! SYSTEM_LIBXML_FOR_BUILD
3969 define gb_ExternalExecutable__register_xmllint
3970 $(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)
3971 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3972 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3973 $(call gb_Package_get_target,libxml2) \
3976 endef
3978 endif # SYSTEM_LIBXML_FOR_BUILD
3980 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3982 gb_ExternalExecutable__register_xsltproc :=
3984 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3986 define gb_ExternalExecutable__register_xsltproc
3987 $(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)
3988 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3989 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3990 $(call gb_Package_get_target,libxml2) \
3991 $(call gb_Package_get_target,libxslt) \
3994 endef
3996 endif # SYSTEM_LIBXSLT_FOR_BUILD
3998 ifneq (,$(SYSTEM_UCPP))
4000 gb_ExternalExecutable__register_ucpp :=
4002 else # ! SYSTEM_UCPP
4004 define gb_ExternalExecutable__register_ucpp
4005 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
4007 endef
4009 endif # SYSTEM_UCPP
4011 ifeq (,$(PYTHON_FOR_BUILD))
4013 define gb_ExternalExecutable__register_python
4014 ifeq ($(OS),MACOSX)
4016 # use set_external, to avoid having the command added as prerequisite for the
4017 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4018 # matching rule to build that specific file)
4019 $(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))
4020 # the Zip ensures that internal python has been built (cannot use the Package
4021 # target, as that is not used on Mac)
4022 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4024 else
4026 $(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))
4027 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4028 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4030 endif
4032 endef
4034 else
4036 define gb_ExternalExecutable__register_python
4037 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4039 endef
4041 endif # PYTHON_FOR_BUILD
4043 ifneq ($(SYSTEM_GENBRK),)
4045 define gb_ExternalExecutable__register_genbrk
4046 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4048 endef
4050 else # ! SYSTEM_GENBRK
4052 define gb_ExternalExecutable__register_genbrk
4053 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4054 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4055 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4056 $(call gb_Package_get_target_for_build,icu) \
4057 $(call gb_Package_get_target_for_build,icu_ure) \
4060 endef
4062 endif
4064 ifneq ($(SYSTEM_GENCCODE),)
4066 define gb_ExternalExecutable__register_genccode
4067 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4069 endef
4071 else # ! SYSTEM_GENCCODE
4073 define gb_ExternalExecutable__register_genccode
4074 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4075 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4076 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4077 $(call gb_Package_get_target_for_build,icu) \
4078 $(call gb_Package_get_target_for_build,icu_ure) \
4081 endef
4083 endif
4085 ifneq ($(SYSTEM_GENCMN),)
4087 define gb_ExternalExecutable__register_gencmn
4088 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4090 endef
4092 else # ! SYSTEM_GENCMN
4094 define gb_ExternalExecutable__register_gencmn
4095 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4096 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4097 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4098 $(call gb_Package_get_target_for_build,icu) \
4099 $(call gb_Package_get_target_for_build,icu_ure) \
4102 endef
4104 endif
4106 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4108 $(eval $(call gb_Helper_register_jars,OXT,\
4109 owncloud-android-library \
4112 define gb_Jar__use_owncloud_android_lib
4113 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4114 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4115 endef
4116 define gb_ExternalProject__use_owncloud_android_lib
4117 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4118 endef
4120 endif
4122 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4123 ifneq ($(SYSTEM_BZIP2),)
4125 define gb_LinkTarget__use_bzip2
4126 $(call gb_LinkTarget_set_include,$(1),\
4127 $(BZIP2_CFLAGS) \
4128 $$(INCLUDE) \
4130 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4132 endef
4134 gb_ExternalProject__use_bzip2 :=
4136 else # !SYSTEM_BZIP2
4138 define gb_LinkTarget__use_bzip2
4139 $(call gb_LinkTarget_set_include,$(1),\
4140 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4141 $$(INCLUDE) \
4144 ifeq ($(COM),MSC)
4145 $(call gb_LinkTarget_add_libs,$(1),\
4146 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4148 else
4149 $(call gb_LinkTarget_add_libs,$(1),\
4150 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4152 endif
4154 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4155 endef
4157 define gb_ExternalProject__use_bzip2
4158 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4159 endef
4161 endif
4162 endif
4164 define gb_LinkTarget__use_clew
4165 $(call gb_LinkTarget_set_include,$(1), \
4166 -I$(SRCDIR)/external/clew/source/include \
4167 $$(INCLUDE) \
4169 $(call gb_LinkTarget_use_libraries,$(1),clew)
4170 endef
4172 ifneq ($(ENABLE_PDFIUM),)
4173 define gb_LinkTarget__use_pdfium
4174 $(call gb_LinkTarget_set_include,$(1),\
4175 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4176 -DCOMPONENT_BUILD \
4177 $$(INCLUDE) \
4179 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4180 endef
4181 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4182 pdfium \
4184 endif
4186 ifneq ($(SYSTEM_QRCODEGEN),)
4188 define gb_LinkTarget__use_qrcodegen
4189 $(call gb_LinkTarget_set_include,$(1),\
4190 -DSYSTEM_QRCODEGEN \
4191 $$(INCLUDE) \
4192 $(QRCODEGEN_CFLAGS) \
4194 $(call gb_LinkTarget_add_libs,$(1),$(QRCODEGEN_LIBS))
4196 endef
4198 gb_ExternalProject__use_qrcodegen :=
4200 else # !SYSTEM_QRCODEGEN
4202 ifneq ($(ENABLE_QRCODEGEN),)
4204 define gb_LinkTarget__use_qrcodegen
4205 $(call gb_LinkTarget_use_unpacked,$(1),qrcodegen)
4206 $(call gb_LinkTarget_set_include,$(1),\
4207 -I$(call gb_UnpackedTarball_get_dir,qrcodegen/cpp/)\
4208 $$(INCLUDE) \
4210 $(call gb_LinkTarget_use_static_libraries,$(1),\
4211 qrcodegen \
4214 endef
4216 define gb_ExternalProject__use_qrcodegen
4217 $(call gb_ExternalProject_use_static_libraries,$(1),qrcodegen)
4219 endef
4221 else # !ENABLE_QRCODEGEN
4223 define gb_LinkTarget__use_qrcodegen
4224 endef
4226 endif # ENABLE_QRCODEGEN
4228 endif # SYSTEM_QRCODEGEN
4230 define gb_LinkTarget__use_dtoa
4231 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4232 $(call gb_LinkTarget_set_include,$(1),\
4233 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4234 $$(INCLUDE) \
4236 $(call gb_LinkTarget_use_static_libraries,$(1),\
4237 dtoa \
4240 endef
4242 define gb_ExternalProject__use_dtoa
4243 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4245 endef
4247 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4248 $(if $(UCRT_REDISTDIR),ucrt) \
4251 ifneq ($(SYSTEM_BOX2D),)
4253 define gb_LinkTarget__use_box2d
4254 $(call gb_LinkTarget_set_include,$(1),\
4255 -DSYSTEM_BOX2D \
4256 $$(INCLUDE) \
4257 $(BOX2D_CFLAGS) \
4259 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4261 endef
4263 gb_ExternalProject__use_box2d :=
4265 else # !SYSTEM_BOX2D
4267 define gb_LinkTarget__use_box2d
4268 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4269 $(call gb_LinkTarget_set_include,$(1),\
4270 -I$(call gb_UnpackedTarball_get_dir,box2d/Box2D/)\
4271 $$(INCLUDE) \
4273 $(call gb_LinkTarget_use_static_libraries,$(1),\
4274 box2d \
4277 endef
4279 define gb_ExternalProject__use_box2d
4280 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4282 endef
4284 endif # SYSTEM_BOX2D
4286 # vim: set noet sw=4 ts=4: