Prepare for removal of non-const operator[] from Sequence in vbahelper
[LibreOffice.git] / RepositoryExternal.mk
blob23d4b2e636372dca3a66b57a9ca513f331aa842b
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 \
351 -DZLIB_CONST \
353 $(call gb_LinkTarget_add_libs,$(1),-lz)
355 endef
357 # nothing on system
358 define gb_LinkTarget__use_zlib_x64
360 endef
362 gb_ExternalProject__use_zlib :=
364 else # !SYSTEM_ZLIB
366 define gb_LinkTarget__use_zlib_multiarch
367 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
369 $(call gb_LinkTarget_add_defs,$(1), \
370 -DZLIB_CONST \
373 $(call gb_LinkTarget_set_include,$(1),\
374 $(ZLIB_CFLAGS) \
375 $$(INCLUDE) \
378 $(call gb_LinkTarget_use_static_libraries,$(1),\
379 $(2) \
382 endef
384 define gb_LinkTarget__use_zlib
385 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
387 endef
389 define gb_LinkTarget__use_zlib_x64
390 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
392 endef
394 define gb_ExternalProject__use_zlib
395 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
397 endef
399 endif # SYSTEM_ZLIB
402 ifneq ($(SYSTEM_LIBJPEG),)
404 define gb_LinkTarget__use_libjpeg
405 $(call gb_LinkTarget_set_include,$(1),\
406 $$(INCLUDE) \
407 $(LIBJPEG_CFLAGS) \
409 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
410 $(call gb_LinkTarget_set_ldflags,$(1),\
411 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
414 endef
416 gb_ExternalProject__use_libjpeg :=
418 else
420 define gb_LinkTarget__use_libjpeg
421 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
422 $(call gb_LinkTarget_set_include,$(1),\
423 -I$(call gb_UnpackedTarball_get_dir,libjpeg-turbo) \
424 $$(INCLUDE) \
426 $(call gb_LinkTarget_use_static_libraries,$(1),libjpeg-turbo)
428 endef
430 define gb_ExternalProject__use_libjpeg
431 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
433 endef
435 endif # SYSTEM_LIBJPEG
437 ifneq ($(SYSTEM_MYTHES),)
439 define gb_LinkTarget__use_mythes
440 $(call gb_LinkTarget_set_include,$(1),\
441 $$(INCLUDE) \
442 $(MYTHES_CFLAGS) \
444 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
446 endef
448 else # !SYSTEM_MYTHES
450 define gb_LinkTarget__use_mythes
451 $(call gb_LinkTarget_set_include,$(1),\
452 -I$(call gb_UnpackedTarball_get_dir,mythes) \
453 $$(INCLUDE) \
456 ifeq ($(COM),MSC)
457 $(call gb_LinkTarget_use_static_libraries,$(1),\
458 mythes \
460 else
461 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
462 $(call gb_LinkTarget_use_external_project,$(1),mythes)
463 endif
465 endef
467 endif # SYSTEM_MYTHES
470 ifneq ($(SYSTEM_EXPAT),)
472 define gb_LinkTarget__use_expat_impl
473 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
475 $(call gb_LinkTarget_add_defs,$(1),\
476 -DSYSTEM_EXPAT \
479 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
481 endef
483 gb_ExternalProject__use_expat :=
485 else # !SYSTEM_EXPAT
487 define gb_LinkTarget__use_expat_impl
488 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
490 $(call gb_LinkTarget_set_include,$(1),\
491 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
492 $$(INCLUDE) \
495 $(call gb_LinkTarget_use_static_libraries,$(1),\
496 $(2) \
499 endef
501 define gb_ExternalProject__use_expat
502 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
504 endef
506 endif # SYSTEM_EXPAT
508 define gb_LinkTarget__use_expat
509 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
511 endef
513 define gb_LinkTarget__use_expat_x64
514 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
516 endef
518 ifneq ($(SYSTEM_HYPH),)
520 define gb_LinkTarget__use_hyphen
521 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
523 endef
525 else # !SYSTEM_HYPH
527 define gb_LinkTarget__use_hyphen
528 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
529 $(call gb_LinkTarget_set_include,$(1),\
530 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
531 $$(INCLUDE) \
534 ifeq ($(COM),MSC)
535 $(call gb_LinkTarget_use_static_libraries,$(1),\
536 hyphen \
538 else
539 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
540 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
541 endif
543 endef
545 endif # SYSTEM_HYPH
547 ifneq ($(SYSTEM_HUNSPELL),)
549 define gb_LinkTarget__use_hunspell
550 $(call gb_LinkTarget_set_include,$(1),\
551 $$(INCLUDE) \
552 $(HUNSPELL_CFLAGS) \
554 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
556 endef
558 gb_ExternalProject__use_hunspell :=
560 else # !SYSTEM_HUNSPELL
562 define gb_LinkTarget__use_hunspell
563 $(call gb_LinkTarget_add_defs,$(1),\
564 -DHUNSPELL_STATIC \
566 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
567 $(call gb_LinkTarget_set_include,$(1),\
568 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
569 $$(INCLUDE) \
572 ifeq ($(COM),MSC)
573 $(call gb_LinkTarget_use_static_libraries,$(1),\
574 hunspell \
576 else
577 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
578 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
579 endif
581 endef
583 define gb_ExternalProject__use_hunspell
584 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
586 endef
588 endif # SYSTEM_HUNSPELL
591 ifneq ($(SYSTEM_BOOST),)
593 define gb_LinkTarget__use_boost_lib
594 $(call gb_LinkTarget_set_include,$(1),\
595 $$(INCLUDE) \
596 $(BOOST_CPPFLAGS) \
599 $(call gb_LinkTarget_add_ldflags,$(1),\
600 $(BOOST_LDFLAGS) \
603 $(call gb_LinkTarget_add_libs,$(1),$(2))
605 endef
607 define gb_LinkTarget__use_boost_locale
608 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
610 endef
612 define gb_LinkTarget__use_boost_date_time
613 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
615 endef
617 define gb_LinkTarget__use_boost_filesystem
618 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
620 endef
622 gb_ExternalProject__use_boost_filesystem :=
624 define gb_LinkTarget__use_boost_iostreams
625 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
627 endef
629 gb_ExternalProject__use_boost_iostreams :=
631 define gb_LinkTarget__use_boost_system
632 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
634 endef
636 gb_ExternalProject__use_boost_system :=
638 define gb_LinkTarget__use_boost_headers
639 $(call gb_LinkTarget_set_include,$(1),\
640 $$(INCLUDE) \
641 $(BOOST_CPPFLAGS) \
644 endef
646 gb_ExternalProject__use_boost_headers:=
648 else # !SYSTEM_BOOST
650 define gb_LinkTarget__use_boost_lib
651 $(call gb_LinkTarget_add_defs,$(1),\
652 -DBOOST_ALL_NO_LIB \
655 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
657 endef
659 define gb_LinkTarget__use_boost_locale
660 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
661 $(call gb_LinkTarget_add_libs,$(1),\
662 $(if $(filter $(OS),MACOSX),-liconv) \
665 endef
667 define gb_LinkTarget__use_boost_date_time
668 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
670 endef
672 define gb_LinkTarget__use_boost_filesystem
673 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
675 endef
677 define gb_ExternalProject__use_boost_filesystem
678 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
679 endef
681 define gb_LinkTarget__use_boost_iostreams
682 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
684 endef
686 define gb_ExternalProject__use_boost_iostreams
687 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
688 endef
690 define gb_LinkTarget__use_boost_system
691 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
693 endef
695 define gb_ExternalProject__use_boost_system
696 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
697 endef
699 define gb_LinkTarget__use_boost_headers
700 $(call gb_LinkTarget_use_unpacked,$(1),boost)
701 $(call gb_LinkTarget_set_include,$(1),\
702 $(BOOST_CPPFLAGS) \
703 $$(INCLUDE) \
706 endef
708 define gb_ExternalProject__use_boost_headers
709 $(call gb_ExternalProject_use_unpacked,$(1),boost)
711 endef
713 endif # SYSTEM_BOOST
716 ifneq ($(SYSTEM_LIBCMIS),)
718 define gb_LinkTarget__use_libcmis
719 $(call gb_LinkTarget_set_include,$(1),\
720 $$(INCLUDE) \
721 $(LIBCMIS_CFLAGS) \
723 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
725 endef
727 else # !SYSTEM_LIBCMIS
729 define gb_LinkTarget__use_libcmis
730 $(call gb_LinkTarget_set_include,$(1),\
731 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
732 $$(INCLUDE) \
734 $(call gb_LinkTarget_use_static_libraries,$(1),\
735 libcmis \
738 endef
740 endif # SYSTEM_LIBCMIS
742 ifeq ($(ENABLE_JAVA),TRUE)
744 define gb_LinkTarget__use_jawt
745 $(call gb_LinkTarget_add_libs,$(1),\
746 $(JAWTLIB) \
749 endef
751 else # !ENABLE_JAVA
753 gb_LinkTarget__use_jawt :=
755 endif # ENABLE_JAVA
757 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
759 define gb_LinkTarget__use_libatomic_ops
760 $(call gb_LinkTarget_set_include,$(1),\
761 $$(INCLUDE) \
762 $(LIBATOMIC_OPS_CFLAGS) \
764 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
766 endef
767 gb_ExternalProject__use_libatomic_ops :=
769 else # !SYSTEM_LIBATOMIC_OPS
771 define gb_LinkTarget__use_libatomic_ops
772 $(call gb_LinkTarget_set_include,$(1),\
773 $(LIBATOMIC_OPS_CFLAGS) \
774 $$(INCLUDE) \
775 $(LIBATOMIC_OPS_CFLAGS) \
777 $(call gb_LinkTarget_use_external_project,$(1),\
778 libatomic_ops \
781 $(call gb_LinkTarget_add_libs,$(1),\
782 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
785 endef
787 define gb_ExternalProject__use_libatomic_ops
788 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
790 endef
792 endif # SYSTEM_LIBATOMIC_OPS
795 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
797 define gb_LinkTarget__use_libexttextcat
798 $(call gb_LinkTarget_set_include,$(1),\
799 $$(INCLUDE) \
800 $(LIBEXTTEXTCAT_CFLAGS) \
802 $(call gb_LinkTarget_add_defs,$(1),\
803 -DSYSTEM_LIBEXTTEXTCAT \
805 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
807 endef
809 else # !SYSTEM_LIBEXTTEXTCAT
811 define gb_LinkTarget__use_libexttextcat
812 $(call gb_LinkTarget_set_include,$(1),\
813 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
814 $$(INCLUDE) \
817 ifeq ($(COM),MSC)
818 $(call gb_LinkTarget_use_static_libraries,$(1),\
819 libexttextcat \
821 else
822 $(call gb_LinkTarget_add_libs,$(1),\
823 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
825 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
826 endif
829 endef
831 endif # SYSTEM_LIBEXTTEXTCAT
834 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
836 define gb_LinkTarget__use_libnumbertext
837 $(call gb_LinkTarget_set_include,$(1),\
838 $$(INCLUDE) \
839 $(LIBNUMBERTEXT_CFLAGS) \
841 $(call gb_LinkTarget_add_defs,$(1),\
842 -DSYSTEM_LIBNUMBERTEXT \
844 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
846 endef
848 else # !SYSTEM_LIBNUMBERTEXT
850 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
851 libnumbertext_numbertext \
854 define gb_LinkTarget__use_libnumbertext
855 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
856 $(call gb_LinkTarget_set_include,$(1),\
857 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
858 $$(INCLUDE) \
861 ifeq ($(COM),MSC)
862 $(call gb_LinkTarget_use_static_libraries,$(1),\
863 libnumbertext \
865 else
867 $(call gb_LinkTarget_add_libs,$(1),\
868 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
870 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
872 endif
874 endef
876 endif # SYSTEM_LIBNUMBERTEXT
879 ifneq ($(SYSTEM_LIBXML),)
881 define gb_LinkTarget__use_libxml2
882 $(call gb_LinkTarget_add_defs,$(1),\
883 -DSYSTEM_LIBXML \
885 $(call gb_LinkTarget_set_include,$(1),\
886 $$(INCLUDE) \
887 $(LIBXML_CFLAGS) \
889 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
891 endef
892 gb_ExternalProject__use_libxml2:=
894 else # !SYSTEM_LIBXML
896 $(eval $(call gb_Helper_register_packages_for_install,ure,\
897 libxml2 \
900 define gb_LinkTarget__use_libxml2
901 $(call gb_LinkTarget_use_package,$(1),libxml2)
902 $(call gb_LinkTarget_set_include,$(1),\
903 $$(INCLUDE) \
904 $(LIBXML_CFLAGS) \
907 $(call gb_LinkTarget_add_libs,$(1),\
908 $(LIBXML_LIBS) \
911 ifeq ($(COM),MSC)
912 $(call gb_LinkTarget_use_external,$(1),icu_headers)
913 endif
915 endef
916 define gb_ExternalProject__use_libxml2
917 $(call gb_ExternalProject_use_package,$(1),libxml2)
919 ifeq ($(COM),MSC)
920 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
921 endif
923 endef
925 endif # SYSTEM_LIBXML
928 ifneq ($(SYSTEM_LIBXSLT),)
930 define gb_LinkTarget__use_libxslt
931 $(call gb_LinkTarget_set_include,$(1),\
932 $$(INCLUDE) \
933 $(LIBXSLT_CFLAGS) \
935 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
937 endef
939 define gb_LinkTarget__use_libexslt
940 $(call gb_LinkTarget_set_include,$(1),\
941 $$(INCLUDE) \
942 $(LIBEXSLT_CFLAGS) \
945 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
947 endef
949 else # !SYSTEM_LIBXSLT
951 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
952 libxslt \
955 define gb_LinkTarget__use_libxslt
956 $(call gb_LinkTarget_use_package,$(1),libxslt)
957 $(call gb_LinkTarget_set_include,$(1),\
958 $$(INCLUDE) \
959 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
962 ifeq ($(COM),MSC)
963 $(call gb_LinkTarget_add_libs,$(1),\
964 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
966 else
967 $(call gb_LinkTarget_add_libs,$(1),\
968 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
970 endif
972 endef
974 define gb_LinkTarget__use_libexslt
975 $(call gb_LinkTarget_use_package,$(1),libxslt)
976 $(call gb_LinkTarget_set_include,$(1),\
977 $$(INCLUDE) \
978 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
981 ifeq ($(COM),MSC)
982 $(call gb_LinkTarget_add_libs,$(1),\
983 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
985 else
986 $(call gb_LinkTarget_add_libs,$(1),\
987 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
989 endif
991 endef
993 endif # SYSTEM_LIBXSLT
996 ifneq ($(SYSTEM_XMLSEC),)
998 define gb_LinkTarget__use_xmlsec
999 $(call gb_LinkTarget_add_defs,$(1),\
1000 -DSYSTEM_XMLSEC \
1002 $(call gb_LinkTarget_set_include,$(1),\
1003 $$(INCLUDE) \
1004 $(XMLSEC_CFLAGS) \
1006 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
1008 endef
1010 gb_ExternalProject__use_xmlsec:=
1012 else # !SYSTEM_XMLSEC
1014 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1015 xmlsec \
1018 define gb_LinkTarget__use_xmlsec
1020 endef
1022 endif # SYSTEM_XMLSEC
1024 ifneq ($(SYSTEM_LIBLANGTAG),)
1026 define gb_LinkTarget__use_liblangtag
1027 $(call gb_LinkTarget_set_include,$(1),\
1028 $$(INCLUDE) \
1029 $(LIBLANGTAG_CFLAGS) \
1032 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1034 endef
1036 gb_ExternalProject__use_liblangtag :=
1038 else # !SYSTEM_LIBLANGTAG
1040 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1041 liblangtag_data \
1044 ifeq ($(COM),MSC)
1046 define gb_LinkTarget__use_liblangtag
1047 $(call gb_LinkTarget_set_include,$(1),\
1048 $(LIBLANGTAG_CFLAGS) \
1049 $$(INCLUDE) \
1051 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1052 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1054 endef
1056 else
1058 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1059 liblangtag \
1062 define gb_LinkTarget__use_liblangtag
1063 $(call gb_LinkTarget_set_include,$(1),\
1064 $(LIBLANGTAG_CFLAGS) \
1065 $$(INCLUDE) \
1067 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1068 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1070 endef
1072 endif # MSC
1074 define gb_ExternalProject__use_liblangtag
1075 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1077 endef
1079 endif # SYSTEM_LIBLANGTAG
1082 gb_ExternalProject__use_apr :=
1084 ifeq ($(WITH_WEBDAV),serf)
1086 define gb_LinkTarget__use_apr
1087 $(call gb_LinkTarget_set_include,$(1),\
1088 $$(INCLUDE) \
1089 $(APR_CFLAGS) \
1091 $(call gb_LinkTarget_add_libs,$(1),\
1092 $(APR_LIBS) \
1093 $(if $(filter $(OS),LINUX),-lpthread) \
1094 $(if $(filter $(OS),MACOSX),-liconv) \
1097 ifeq ($(SYSTEM_APR),)
1098 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1099 mswsock \
1100 rpcrt4 \
1101 shell32 \
1103 $(call gb_LinkTarget_add_defs,$(1),\
1104 -DAPR_DECLARE_STATIC \
1105 -DAPU_DECLARE_STATIC \
1107 $(call gb_LinkTarget_use_external_project,$(1),apr_util,full)
1108 endif
1110 endef
1112 define gb_ExternalProject__use_apr
1113 ifeq ($(SYSTEM_APR),)
1114 $(call gb_ExternalProject_use_external_project,$(1),apr_util,full)
1115 endif
1117 endef
1119 ifneq ($(SYSTEM_SERF),)
1121 define gb_LinkTarget__use_serf
1122 $(call gb_LinkTarget_add_defs,$(1),\
1123 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS))) \
1126 $(call gb_LinkTarget_set_include,$(1),\
1127 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS)))) \
1128 $$(INCLUDE) \
1131 $(call gb_LinkTarget_add_libs,$(1),\
1132 $(SERF_LIBS) \
1135 endef
1137 else # !SYSTEM_SERF
1139 define gb_LinkTarget__use_serf
1140 $(call gb_LinkTarget_set_include,$(1),\
1141 -I$(call gb_UnpackedTarball_get_dir,serf) \
1142 $$(INCLUDE) \
1145 $(call gb_LinkTarget_use_static_libraries,$(1),\
1146 serf \
1149 endef
1151 endif # SYSTEM_SERF
1153 else ifeq ($(WITH_WEBDAV),neon)
1155 ifneq ($(SYSTEM_NEON),)
1157 define gb_LinkTarget__use_neon
1158 $(call gb_LinkTarget_add_defs,$(1),\
1159 -DNEON_VERSION=0x$(NEON_VERSION) \
1160 -DSYSTEM_NEON \
1162 $(call gb_LinkTarget_set_include,$(1),\
1163 $$(INCLUDE) \
1164 $(NEON_CFLAGS) \
1167 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1169 endef
1171 else # !SYSTEM_NEON
1173 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1174 neon \
1177 define gb_LinkTarget__use_neon
1178 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1179 $(call gb_LinkTarget_set_include,$(1),\
1180 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1181 $$(INCLUDE) \
1183 $(call gb_LinkTarget_use_libraries,$(1),\
1184 neon \
1187 endef
1189 endif # SYSTEM_NEON
1191 endif # WITH_WEBDAV
1193 ifneq ($(SYSTEM_REDLAND),)
1195 define gb_LinkTarget__use_librdf
1196 $(call gb_LinkTarget_add_defs,$(1),\
1197 -DSYSTEM_REDLAND \
1199 $(call gb_LinkTarget_set_include,$(1),\
1200 $$(INCLUDE) \
1201 $(REDLAND_CFLAGS) \
1203 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1205 endef
1207 gb_LinkTarget__use_redland_headers:=
1209 gb_LinkTarget__use_raptor_headers:=
1211 gb_LinkTarget__use_rasqal_headers:=
1213 else # !SYSTEM_REDLAND
1215 define gb_LinkTarget__use_redland_headers
1216 $(call gb_LinkTarget_set_include,$(1),\
1217 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1218 $$(INCLUDE) \
1221 endef
1223 define gb_LinkTarget__use_raptor_headers
1224 $(call gb_LinkTarget_set_include,$(1),\
1225 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1226 $$(INCLUDE) \
1229 endef
1231 define gb_LinkTarget__use_rasqal_headers
1232 $(call gb_LinkTarget_set_include,$(1),\
1233 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1234 $$(INCLUDE) \
1237 endef
1239 ifneq ($(OS),ANDROID)
1241 ifeq ($(COM),MSC)
1242 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1243 raptor2 \
1244 rasqal \
1245 rdf \
1247 else
1248 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1249 raptor \
1250 rasqal \
1251 redland \
1253 endif
1255 define gb_LinkTarget__use_librdf
1256 ifeq ($(COM),MSC)
1257 $(call gb_LinkTarget_use_libraries,$(1),\
1258 raptor2 \
1259 rdf \
1261 else
1262 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1264 $(call gb_LinkTarget_add_libs,$(1),\
1265 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1266 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1267 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1269 endif
1271 endef
1273 else # ANDROID
1275 define gb_LinkTarget__use_librdf
1276 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1278 endef
1280 endif # ANDROID
1282 endif # SYSTEM_REDLAND
1284 ifneq ($(SYSTEM_CAIRO),)
1286 define gb_LinkTarget__use_cairo
1287 $(call gb_LinkTarget_set_include,$(1),\
1288 $$(INCLUDE) \
1289 $(CAIRO_CFLAGS) \
1291 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1292 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1294 endef
1296 else # !SYSTEM_CAIRO
1298 ifneq ($(filter-out MACOSX WNT,$(OS)),)
1300 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1301 cairo \
1302 pixman \
1305 define gb_LinkTarget__use_cairo
1306 $(call gb_LinkTarget_use_package,$(1),cairo)
1307 $(call gb_LinkTarget_use_package,$(1),pixman)
1308 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1309 $(call gb_LinkTarget_set_include,$(1),\
1310 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1311 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1312 -I$(call gb_UnpackedTarball_get_dir,pixman)/pixman \
1313 $$(INCLUDE) \
1315 $(call gb_LinkTarget_add_libs,$(1),\
1316 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1317 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1320 endef
1322 endif # !MACOSX, !WNT
1324 endif # !SYSTEM_CAIRO
1326 ifneq ($(SYSTEM_FREETYPE),)
1328 define gb_LinkTarget__use_freetype_headers
1329 $(call gb_LinkTarget_set_include,$(1),\
1330 $$(INCLUDE) \
1331 $(FREETYPE_CFLAGS) \
1334 endef
1336 gb_ExternalProject__use_freetype :=
1338 else
1340 define gb_LinkTarget__use_freetype_headers
1341 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1342 $(call gb_LinkTarget_set_include,$(1),\
1343 $(FREETYPE_CFLAGS) \
1344 $$(INCLUDE) \
1347 endef
1349 define gb_ExternalProject__use_freetype
1350 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1352 endef
1354 endif # SYSTEM_FREETYPE
1356 define gb_LinkTarget__use_freetype
1357 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1358 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1360 endef
1362 ifneq ($(SYSTEM_FONTCONFIG),)
1364 define gb_LinkTarget__use_fontconfig
1365 $(call gb_LinkTarget_set_include,$(1),\
1366 $$(INCLUDE) \
1367 $(FONTCONFIG_CFLAGS) \
1370 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1372 endef
1374 gb_ExternalProject__use_fontconfig :=
1376 else
1378 define gb_LinkTarget__use_fontconfig
1379 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1380 $(call gb_LinkTarget_set_include,$(1),\
1381 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1382 $$(INCLUDE) \
1385 $(call gb_LinkTarget_add_libs,$(1),\
1386 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1389 endef
1391 define gb_ExternalProject__use_fontconfig
1392 $(call gb_ExternalProject_use_external_project,$(1),fontconfig)
1394 endef
1396 endif # SYSTEM_FONTCONFIG
1398 ifneq ($(SYSTEM_GRAPHITE),)
1400 define gb_LinkTarget__use_graphite
1401 $(call gb_LinkTarget_set_include,$(1),\
1402 $$(INCLUDE) \
1403 $(GRAPHITE_CFLAGS) \
1405 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1407 endef
1409 gb_ExternalProject__use_graphite:=
1411 else # !SYSTEM_GRAPHITE
1413 define gb_LinkTarget__use_graphite
1414 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1415 $(call gb_LinkTarget_set_include,$(1),\
1416 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1417 $$(INCLUDE) \
1419 $(call gb_LinkTarget_use_static_libraries,$(1),\
1420 graphite \
1423 endef
1425 define gb_ExternalProject__use_graphite
1426 $(call gb_ExternalProject_use_static_libraries,$(1),\
1427 graphite \
1430 endef
1431 endif # SYSTEM_GRAPHITE
1433 ifneq ($(SYSTEM_ICU),)
1435 gb_LinkTarget__use_icu_headers:=
1436 gb_ExternalProject__use_icu:=
1438 define gb_LinkTarget__use_icudata
1439 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1441 endef
1442 define gb_LinkTarget__use_icui18n
1443 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1445 endef
1446 define gb_LinkTarget__use_icuuc
1447 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1449 endef
1451 else # !SYSTEM_ICU
1453 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1454 icu_ure \
1457 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1458 icu \
1461 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1462 gb_ICU_suffix:=lo
1463 else
1464 gb_ICU_suffix:=
1465 endif
1467 define gb_LinkTarget__use_icu_headers
1468 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1469 $(call gb_LinkTarget_set_include,$(1),\
1470 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1471 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1472 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1473 $$(INCLUDE) \
1476 endef
1478 define gb_ExternalProject__use_icu
1479 $(call gb_ExternalProject_use_package,$(1),icu)
1481 endef
1483 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1484 define gb_LinkTarget__use_icudata
1485 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1487 ifeq ($(OS),WNT)
1488 $(call gb_LinkTarget_add_libs,$(1),\
1489 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(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 -licudata$(gb_ICU_suffix) \
1495 endif
1497 endef
1499 define gb_LinkTarget__use_icui18n
1500 $(call gb_LinkTarget_use_package,$(1),icu)
1502 ifeq ($(OS),WNT)
1503 $(call gb_LinkTarget_add_libs,$(1),\
1504 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(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 -licui18n$(gb_ICU_suffix) \
1510 endif
1512 endef
1514 define gb_LinkTarget__use_icuuc
1515 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1517 ifeq ($(OS),WNT)
1518 $(call gb_LinkTarget_add_libs,$(1),\
1519 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1521 else
1522 $(call gb_LinkTarget_add_libs,$(1),\
1523 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1525 endif
1527 endef
1529 endif # SYSTEM_ICU
1531 ifneq ($(SYSTEM_HARFBUZZ),)
1533 define gb_LinkTarget__use_harfbuzz
1534 $(call gb_LinkTarget_set_include,$(1),\
1535 $$(INCLUDE) \
1536 $(HARFBUZZ_CFLAGS) \
1538 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1540 endef
1542 gb_ExternalProject__use_harfbuzz :=
1544 else # SYSTEM_HARFBUZZ != TRUE
1546 define gb_LinkTarget__use_harfbuzz
1547 $(call gb_LinkTarget_set_include,$(1),\
1548 $(HARFBUZZ_CFLAGS) \
1549 $$(INCLUDE) \
1551 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1552 $(call gb_LinkTarget_use_external,$(1),icuuc)
1553 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1555 endef
1557 define gb_ExternalProject__use_harfbuzz
1558 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1560 endef
1562 endif # SYSTEM_HARFBUZZ
1564 ifneq ($(ENABLE_OPENSSL),TRUE)
1566 gb_ExternalProject__use_openssl:=
1567 gb_LinkTarget__use_openssl_headers:=
1568 gb_LinkTarget__use_openssl:=
1570 else # ENABLE_OPENSSL
1572 ifneq ($(SYSTEM_OPENSSL),)
1574 gb_LinkTarget__use_openssl_headers:=
1575 gb_ExternalProject__use_openssl:=
1577 define gb_LinkTarget__use_openssl
1578 $(call gb_LinkTarget_set_include,$(1),\
1579 $$(INCLUDE) \
1580 $(OPENSSL_CFLAGS) \
1582 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1584 endef
1586 else # !SYSTEM_OPENSSL
1588 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1589 openssl \
1592 define gb_ExternalProject__use_openssl
1593 $(call gb_ExternalProject_use_package,$(1),openssl)
1595 endef
1597 define gb_LinkTarget__use_openssl_headers
1598 $(call gb_LinkTarget_use_external_project,$(1),openssl,full)
1599 $(call gb_LinkTarget_set_include,$(1),\
1600 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1601 $$(INCLUDE) \
1604 endef
1606 define gb_LinkTarget__use_openssl
1607 $(call gb_LinkTarget_use_package,$(1),openssl)
1608 ifeq ($(OS),WNT)
1609 $(call gb_LinkTarget_add_libs,$(1),\
1610 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
1611 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
1613 else
1614 $(call gb_LinkTarget_add_libs,$(1),\
1615 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1616 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1617 $(if $(filter $(OS),LINUX),-pthread) \
1619 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1620 ifeq ($(OS),SOLARIS)
1621 $(call gb_LinkTarget_add_libs,$(1),\
1622 -lnsl \
1623 -lsocket \
1625 endif
1626 endif
1628 endef
1630 endif # SYSTEM_OPENSSL
1631 endif # ENABLE_OPENSSL
1634 ifneq ($(ENABLE_OPENSSL),TRUE)
1636 define gb_LinkTarget__use_gnutls
1637 $(call gb_LinkTarget_set_include,$(1),\
1638 $$(INCLUDE) \
1639 $(GNUTLS_CFLAGS) \
1642 $(call gb_LinkTarget_add_defs,$(1),\
1643 -DDISABLE_OPENSSL \
1646 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1648 endef
1650 define gb_LinkTarget__use_libgcrypt
1651 $(call gb_LinkTarget_set_include,$(1),\
1652 $$(INCLUDE) \
1653 $(LIBGCRYPT_CFLAGS) \
1656 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1658 endef
1660 else # ENABLE_OPENSSL
1662 gb_LinkTarget__use_gnutls:=
1663 gb_LinkTarget__use_libgcrypt:=
1665 endif # ENABLE_OPENSSL
1668 ifneq ($(SYSTEM_CDR),)
1670 define gb_LinkTarget__use_cdr
1671 $(call gb_LinkTarget_set_include,$(1),\
1672 $$(INCLUDE) \
1673 $(CDR_CFLAGS) \
1675 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1677 endef
1679 else # !SYSTEM_CDR
1681 define gb_LinkTarget__use_cdr
1682 $(call gb_LinkTarget_set_include,$(1),\
1683 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1684 $$(INCLUDE) \
1686 $(call gb_LinkTarget_add_libs,$(1),\
1687 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1689 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1690 endef
1692 endif # SYSTEM_CDR
1695 ifneq ($(SYSTEM_EBOOK),)
1697 define gb_LinkTarget__use_ebook
1698 $(call gb_LinkTarget_set_include,$(1),\
1699 $$(INCLUDE) \
1700 $(EBOOK_CFLAGS) \
1702 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1704 endef
1706 gb_ExternalProject__use_ebook :=
1708 else # !SYSTEM_EBOOK
1710 define gb_LinkTarget__use_ebook
1711 $(call gb_LinkTarget_set_include,$(1),\
1712 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1713 $$(INCLUDE) \
1715 $(call gb_LinkTarget_add_libs,$(1),\
1716 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1718 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1720 endef
1722 define gb_ExternalProject__use_ebook
1723 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1725 endef
1727 endif # SYSTEM_EBOOK
1730 ifneq ($(SYSTEM_ETONYEK),)
1732 define gb_LinkTarget__use_etonyek
1733 $(call gb_LinkTarget_set_include,$(1),\
1734 $$(INCLUDE) \
1735 $(ETONYEK_CFLAGS) \
1737 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1739 endef
1741 gb_ExternalProject__use_etonyek :=
1743 else # !SYSTEM_ETONYEK
1745 ifeq ($(COM),MSC)
1747 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1748 etonyek \
1751 define gb_LinkTarget__use_etonyek
1752 $(call gb_LinkTarget_set_include,$(1),\
1753 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1754 $$(INCLUDE) \
1756 $(call gb_LinkTarget_use_libraries,$(1),\
1757 etonyek \
1760 endef
1762 else # !MSC
1764 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1765 libetonyek \
1768 define gb_LinkTarget__use_etonyek
1769 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1771 $(call gb_LinkTarget_set_include,$(1),\
1772 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1773 -DLIBETONYEK_VISIBILITY \
1774 $$(INCLUDE) \
1776 $(call gb_LinkTarget_add_libs,$(1),\
1777 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1779 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1781 endef
1783 define gb_ExternalProject__use_etonyek
1784 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1786 endef
1788 endif
1790 endif # SYSTEM_ETONYEK
1793 ifneq ($(SYSTEM_FREEHAND),)
1795 define gb_LinkTarget__use_freehand
1796 $(call gb_LinkTarget_set_include,$(1),\
1797 $$(INCLUDE) \
1798 $(FREEHAND_CFLAGS) \
1800 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1802 endef
1804 gb_ExternalProject__use_freehand :=
1806 else # !SYSTEM_FREEHAND
1808 define gb_LinkTarget__use_freehand
1809 $(call gb_LinkTarget_set_include,$(1),\
1810 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1811 $$(INCLUDE) \
1813 $(call gb_LinkTarget_add_libs,$(1),\
1814 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1816 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1818 endef
1820 define gb_ExternalProject__use_freehand
1821 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1823 endef
1825 endif # SYSTEM_FREEHAND
1828 ifneq ($(SYSTEM_ODFGEN),)
1830 define gb_LinkTarget__use_odfgen
1831 $(call gb_LinkTarget_set_include,$(1),\
1832 $$(INCLUDE) \
1833 $(ODFGEN_CFLAGS) \
1835 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1837 endef
1839 else # !SYSTEM_ODFGEN
1841 ifeq ($(COM),MSC)
1843 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1844 odfgen \
1847 define gb_LinkTarget__use_odfgen
1848 $(call gb_LinkTarget_set_include,$(1),\
1849 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1850 $$(INCLUDE) \
1852 $(call gb_LinkTarget_use_libraries,$(1),\
1853 odfgen \
1856 endef
1858 else # !MSC
1860 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1861 libodfgen \
1864 define gb_LinkTarget__use_odfgen
1865 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1867 $(call gb_LinkTarget_set_include,$(1),\
1868 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1869 -DLIBODFGEN_VISIBILITY \
1870 $$(INCLUDE) \
1872 $(call gb_LinkTarget_add_libs,$(1),\
1873 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1876 endef
1878 endif
1880 endif # SYSTEM_ODFGEN
1882 ifneq ($(SYSTEM_EPUBGEN),)
1884 define gb_LinkTarget__use_epubgen
1885 $(call gb_LinkTarget_set_include,$(1),\
1886 $$(INCLUDE) \
1887 $(EPUBGEN_CFLAGS) \
1889 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1891 endef
1892 gb_ExternalProject__use_epubgen :=
1894 else # !SYSTEM_EPUBGEN
1896 define gb_LinkTarget__use_epubgen
1897 $(call gb_LinkTarget_set_include,$(1),\
1898 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1899 $$(INCLUDE) \
1901 $(call gb_LinkTarget_add_libs,$(1),\
1902 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1904 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1906 endef
1907 define gb_ExternalProject__use_epubgen
1908 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1910 endef
1912 endif # SYSTEM_EPUBGEN
1914 ifneq ($(SYSTEM_REVENGE),)
1916 define gb_LinkTarget__use_revenge
1917 $(call gb_LinkTarget_set_include,$(1),\
1918 $$(INCLUDE) \
1919 $(REVENGE_CFLAGS) \
1921 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1923 endef
1925 gb_ExternalProject__use_revenge :=
1927 else # !SYSTEM_REVENGE
1929 ifeq ($(COM),MSC)
1931 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1932 revenge \
1935 define gb_LinkTarget__use_revenge
1936 $(call gb_LinkTarget_set_include,$(1),\
1937 $(REVENGE_CFLAGS) \
1938 $$(INCLUDE) \
1940 $(call gb_LinkTarget_use_libraries,$(1),\
1941 revenge \
1944 endef
1946 define gb_ExternalProject__use_revenge
1947 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1949 endef
1951 else # !MSC
1953 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1954 librevenge \
1957 define gb_LinkTarget__use_revenge
1958 $(call gb_LinkTarget_use_package,$(1),librevenge)
1960 $(call gb_LinkTarget_set_include,$(1),\
1961 $(REVENGE_CFLAGS) \
1962 -DLIBREVENGE_VISIBILITY \
1963 $$(INCLUDE) \
1965 $(call gb_LinkTarget_add_libs,$(1),\
1966 $(REVENGE_LIBS) \
1968 endef
1970 define gb_ExternalProject__use_revenge
1971 $(call gb_ExternalProject_use_package,$(1),librevenge)
1973 endef
1975 endif # MSC
1977 endif # SYSTEM_REVENGE
1980 ifneq ($(SYSTEM_ABW),)
1982 define gb_LinkTarget__use_abw
1983 $(call gb_LinkTarget_set_include,$(1),\
1984 $$(INCLUDE) \
1985 $(ABW_CFLAGS) \
1987 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1989 endef
1990 gb_ExternalProject__use_abw :=
1992 else # !SYSTEM_ABW
1994 define gb_LinkTarget__use_abw
1995 $(call gb_LinkTarget_set_include,$(1),\
1996 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1997 $$(INCLUDE) \
1999 $(call gb_LinkTarget_add_libs,$(1),\
2000 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
2002 $(call gb_LinkTarget_use_external_project,$(1),libabw)
2004 endef
2005 define gb_ExternalProject__use_abw
2006 $(call gb_ExternalProject_use_external_project,$(1),libabw)
2008 endef
2010 endif # SYSTEM_ABW
2013 ifneq ($(SYSTEM_MSPUB),)
2015 define gb_LinkTarget__use_mspub
2016 $(call gb_LinkTarget_set_include,$(1),\
2017 $$(INCLUDE) \
2018 $(MSPUB_CFLAGS) \
2020 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2022 endef
2024 else # !SYSTEM_MSPUB
2026 define gb_LinkTarget__use_mspub
2027 $(call gb_LinkTarget_set_include,$(1),\
2028 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2029 $$(INCLUDE) \
2031 $(call gb_LinkTarget_add_libs,$(1),\
2032 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2034 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2036 endef
2038 endif # SYSTEM_MSPUB
2041 ifneq ($(SYSTEM_PAGEMAKER),)
2043 define gb_LinkTarget__use_pagemaker
2044 $(call gb_LinkTarget_set_include,$(1),\
2045 $$(INCLUDE) \
2046 $(PAGEMAKER_CFLAGS) \
2048 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2050 endef
2051 gb_ExternalProject__use_pagemaker :=
2053 else # !SYSTEM_PAGEMAKER
2055 define gb_LinkTarget__use_pagemaker
2056 $(call gb_LinkTarget_set_include,$(1),\
2057 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2058 $$(INCLUDE) \
2060 $(call gb_LinkTarget_add_libs,$(1),\
2061 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2063 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2065 endef
2066 define gb_ExternalProject__use_pagemaker
2067 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2069 endef
2071 endif # SYSTEM_PAGEMAKER
2074 ifneq ($(SYSTEM_QXP),)
2076 define gb_LinkTarget__use_qxp
2077 $(call gb_LinkTarget_set_include,$(1),\
2078 $$(INCLUDE) \
2079 $(QXP_CFLAGS) \
2081 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2083 endef
2084 gb_ExternalProject__use_qxp :=
2086 else # !SYSTEM_QXP
2088 define gb_LinkTarget__use_qxp
2089 $(call gb_LinkTarget_set_include,$(1),\
2090 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2091 $$(INCLUDE) \
2093 $(call gb_LinkTarget_add_libs,$(1),\
2094 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2096 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2098 endef
2099 define gb_ExternalProject__use_qxp
2100 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2102 endef
2104 endif # SYSTEM_QXP
2107 ifneq ($(SYSTEM_ZMF),)
2109 define gb_LinkTarget__use_zmf
2110 $(call gb_LinkTarget_set_include,$(1),\
2111 $$(INCLUDE) \
2112 $(ZMF_CFLAGS) \
2114 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2116 endef
2117 gb_ExternalProject__use_zmf :=
2119 else # !SYSTEM_ZMF
2121 define gb_LinkTarget__use_zmf
2122 $(call gb_LinkTarget_set_include,$(1),\
2123 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2124 $$(INCLUDE) \
2126 $(call gb_LinkTarget_add_libs,$(1),\
2127 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2129 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2131 endef
2132 define gb_ExternalProject__use_zmf
2133 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2135 endef
2137 endif # SYSTEM_ZMF
2140 ifneq ($(SYSTEM_VISIO),)
2142 define gb_LinkTarget__use_visio
2143 $(call gb_LinkTarget_set_include,$(1),\
2144 $$(INCLUDE) \
2145 $(VISIO_CFLAGS) \
2147 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2149 endef
2151 else # !SYSTEM_VISIO
2153 define gb_LinkTarget__use_visio
2154 $(call gb_LinkTarget_set_include,$(1),\
2155 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2156 $$(INCLUDE) \
2158 $(call gb_LinkTarget_add_libs,$(1),\
2159 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2161 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2163 endef
2165 endif # SYSTEM_VISIO
2168 ifneq ($(SYSTEM_WPD),)
2170 define gb_LinkTarget__use_wpd
2171 $(call gb_LinkTarget_set_include,$(1),\
2172 $$(INCLUDE) \
2173 $(WPD_CFLAGS) \
2175 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2177 endef
2178 gb_ExternalProject__use_wpd :=
2180 else # !SYSTEM_WPD
2182 ifeq ($(COM),MSC)
2184 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2185 wpd \
2188 define gb_LinkTarget__use_wpd
2189 $(call gb_LinkTarget_set_include,$(1),\
2190 $(WPD_CFLAGS) \
2191 $$(INCLUDE) \
2193 $(call gb_LinkTarget_use_libraries,$(1),\
2194 wpd \
2197 endef
2199 define gb_ExternalProject__use_wpd
2200 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2202 endef
2204 else # !MSC
2206 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2207 libwpd \
2210 define gb_LinkTarget__use_wpd
2211 $(call gb_LinkTarget_use_package,$(1),libwpd)
2213 $(call gb_LinkTarget_set_include,$(1),\
2214 $(WPD_CFLAGS) \
2215 $$(INCLUDE) \
2217 $(call gb_LinkTarget_add_libs,$(1),\
2218 $(WPD_LIBS) \
2221 endef
2223 define gb_ExternalProject__use_wpd
2224 $(call gb_ExternalProject_use_package,$(1),libwpd)
2226 endef
2228 endif # MSC
2230 endif # SYSTEM_WPD
2233 ifneq ($(SYSTEM_WPG),)
2235 define gb_LinkTarget__use_wpg
2236 $(call gb_LinkTarget_set_include,$(1),\
2237 $$(INCLUDE) \
2238 $(WPG_CFLAGS) \
2240 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2242 endef
2243 gb_ExternalProject__use_wpg :=
2245 else # !SYSTEM_WPG
2247 ifeq ($(COM),MSC)
2249 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2250 wpg \
2253 define gb_LinkTarget__use_wpg
2254 $(call gb_LinkTarget_set_include,$(1),\
2255 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2256 $$(INCLUDE) \
2258 $(call gb_LinkTarget_use_libraries,$(1),\
2259 wpg \
2262 endef
2264 else # !MSC
2266 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2267 libwpg \
2270 define gb_LinkTarget__use_wpg
2271 $(call gb_LinkTarget_use_package,$(1),libwpg)
2273 $(call gb_LinkTarget_set_include,$(1),\
2274 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2275 $$(INCLUDE) \
2277 $(call gb_LinkTarget_add_libs,$(1),\
2278 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2281 endef
2283 endif # MSC
2285 endif # SYSTEM_WPG
2288 ifneq ($(SYSTEM_WPS),)
2290 define gb_LinkTarget__use_wps
2291 $(call gb_LinkTarget_set_include,$(1),\
2292 $$(INCLUDE) \
2293 $(WPS_CFLAGS) \
2295 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2297 endef
2298 gb_ExternalProject__use_wps :=
2300 else # !SYSTEM_WPS
2302 ifeq ($(COM),MSC)
2304 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2305 wps \
2308 define gb_LinkTarget__use_wps
2309 $(call gb_LinkTarget_set_include,$(1),\
2310 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2311 $$(INCLUDE) \
2314 $(call gb_LinkTarget_use_libraries,$(1),\
2315 wps \
2318 endef
2320 else # !MSC
2322 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2323 libwps \
2326 define gb_LinkTarget__use_wps
2327 $(call gb_LinkTarget_use_package,$(1),libwps)
2329 $(call gb_LinkTarget_set_include,$(1),\
2330 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2331 $$(INCLUDE) \
2333 $(call gb_LinkTarget_add_libs,$(1),\
2334 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2337 endef
2339 endif # MSC
2341 endif # SYSTEM_WPS
2344 ifneq ($(SYSTEM_MWAW),)
2346 define gb_LinkTarget__use_mwaw
2347 $(call gb_LinkTarget_set_include,$(1),\
2348 $$(INCLUDE) \
2349 $(MWAW_CFLAGS) \
2351 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2353 endef
2355 else # !SYSTEM_MWAW
2357 ifeq ($(COM),MSC)
2359 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2360 mwaw \
2363 define gb_LinkTarget__use_mwaw
2364 $(call gb_LinkTarget_set_include,$(1),\
2365 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2366 $$(INCLUDE) \
2369 $(call gb_LinkTarget_use_libraries,$(1),\
2370 mwaw \
2373 endef
2375 else # !MSC
2377 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2378 libmwaw \
2381 define gb_LinkTarget__use_mwaw
2382 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2384 $(call gb_LinkTarget_set_include,$(1),\
2385 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2386 $$(INCLUDE) \
2388 $(call gb_LinkTarget_add_libs,$(1),\
2389 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2392 endef
2394 endif # MSC
2396 endif # SYSTEM_MWAW
2398 ifneq ($(SYSTEM_STAROFFICE),)
2400 define gb_LinkTarget__use_staroffice
2401 $(call gb_LinkTarget_set_include,$(1),\
2402 $$(INCLUDE) \
2403 $(STAROFFICE_CFLAGS) \
2405 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2407 endef
2409 else # !SYSTEM_STAROFFICE
2411 ifeq ($(COM),MSC)
2413 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2414 staroffice \
2417 define gb_LinkTarget__use_staroffice
2418 $(call gb_LinkTarget_set_include,$(1),\
2419 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2420 $$(INCLUDE) \
2423 $(call gb_LinkTarget_use_libraries,$(1),\
2424 staroffice \
2427 endef
2429 else # !MSC
2431 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2432 libstaroffice \
2435 define gb_LinkTarget__use_staroffice
2436 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2438 $(call gb_LinkTarget_set_include,$(1),\
2439 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2440 $$(INCLUDE) \
2442 $(call gb_LinkTarget_add_libs,$(1),\
2443 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2446 endef
2448 endif # MSC
2450 endif # SYSTEM_STAROFFICE
2453 ifneq ($(SYSTEM_LCMS2),)
2455 define gb_LinkTarget__use_lcms2
2456 $(call gb_LinkTarget_set_include,$(1),\
2457 $$(INCLUDE) \
2458 $(LCMS2_CFLAGS) \
2460 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2462 endef
2464 gb_ExternalProject__use_lcms2 :=
2466 else # !SYSTEM_LCMS2
2468 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2469 lcms2 \
2472 define gb_ExternalProject__use_lcms2
2473 $(call gb_ExternalProject_use_package,$(1),lcms2)
2475 endef
2477 ifeq ($(OS),ANDROID)
2479 define gb_LinkTarget__use_lcms2
2480 $(call gb_LinkTarget_use_package,$(1),lcms2)
2481 $(call gb_LinkTarget_set_include,$(1),\
2482 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2483 $$(INCLUDE) \
2486 endef
2488 else
2490 define gb_LinkTarget__use_lcms2
2491 $(call gb_LinkTarget_use_package,$(1),lcms2)
2492 $(call gb_LinkTarget_set_include,$(1),\
2493 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2494 $$(INCLUDE) \
2496 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2498 endef
2500 endif # ANDROID
2501 endif # SYSTEM_LCMS2
2503 ifneq ($(ENABLE_LPSOLVE),)
2505 ifneq ($(SYSTEM_LPSOLVE),)
2507 define gb_LinkTarget__use_lpsolve
2508 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2509 $(call gb_LinkTarget_add_defs,$(1),\
2510 -DSYSTEM_LPSOLVE \
2513 endef
2515 else # !SYSTEM_LPSOLVE
2517 define gb_LinkTarget__use_lpsolve
2518 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2519 ifeq ($(COM),MSC)
2520 $(call gb_LinkTarget_add_libs,$(1),\
2521 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2523 else
2524 $(call gb_LinkTarget_add_libs,$(1),\
2525 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2527 endif
2528 $(call gb_LinkTarget_set_include,$(1),\
2529 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2530 $$(INCLUDE) \
2533 endef
2535 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2536 lpsolve \
2539 endif # SYSTEM_LPSOLVE
2541 else
2543 gb_LinkTarget__use_lpsolve :=
2545 endif # ENABLE_LPSOLVE
2547 ifneq ($(ENABLE_COINMP),)
2549 ifneq ($(SYSTEM_COINMP),TRUE)
2551 define gb_LinkTarget__use_coinmp
2552 $(call gb_LinkTarget_use_package,$(1),coinmp)
2553 ifeq ($(COM),MSC)
2554 $(call gb_LinkTarget_add_libs,$(1),\
2555 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2557 else
2558 $(call gb_LinkTarget_add_libs,$(1),\
2559 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2560 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2561 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2562 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2563 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2564 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2565 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2567 endif
2568 $(call gb_LinkTarget_set_include,$(1),\
2569 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2570 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2571 $$(INCLUDE) \
2574 endef
2576 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2577 coinmp \
2580 else # SYSTEM_COINMP
2582 define gb_LinkTarget__use_coinmp
2583 $(call gb_LinkTarget_set_include,$(1),\
2584 $$(INCLUDE) \
2585 $(COINMP_CFLAGS) \
2587 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2589 endef
2591 endif
2593 else
2595 gb_LinkTarget__use_coinmp :=
2597 endif # ENABLE_COINMP
2599 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2601 define gb_LinkTarget__use_mDNSResponder
2602 $(call gb_LinkTarget_set_include,$(1),\
2603 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2604 $$(INCLUDE) \
2606 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2607 endef
2609 endif # MDNSRESPONDER
2611 ifeq ($(ENABLE_GIO),TRUE)
2613 define gb_LinkTarget__use_gio
2614 $(call gb_LinkTarget_set_include,$(1),\
2615 $$(INCLUDE) \
2616 $(GIO_CFLAGS) \
2619 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2621 endef
2623 else # ENABLE_GIO
2625 define gb_LinkTarget__use_gio
2627 endef
2629 endif # ENABLE_GIO
2631 ifeq ($(ENABLE_AVAHI),TRUE)
2633 define gb_LinkTarget__use_avahi
2634 $(call gb_LinkTarget_set_include,$(1),\
2635 $$(INCLUDE) \
2636 $(AVAHI_CFLAGS) \
2639 $(call gb_LinkTarget_add_defs,$(1),\
2640 -DENABLE_AVAHI \
2643 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2645 endef
2647 else # ENABLE_AVAHI
2649 gb_LinkTarget__use_avahi :=
2651 endif # ENABLE_AVAHI
2653 ifeq ($(ENABLE_CUPS),TRUE)
2655 define gb_LinkTarget__use_cups
2656 $(call gb_LinkTarget_add_defs,$(1),\
2657 -DENABLE_CUPS \
2660 $(call gb_LinkTarget_add_libs,$(1),\
2661 -lcups \
2664 endef
2666 else # ENABLE_CUPS
2668 define gb_LinkTarget__use_cups
2670 endef
2672 endif # ENABLE_CUPS
2674 ifeq ($(ENABLE_DBUS),TRUE)
2676 define gb_LinkTarget__use_dbus
2677 $(call gb_LinkTarget_set_include,$(1),\
2678 $$(INCLUDE) \
2679 $(DBUS_CFLAGS) \
2682 $(call gb_LinkTarget_add_libs,$(1),\
2683 $(DBUS_LIBS) \
2686 endef
2688 else # ENABLE_DBUS
2690 define gb_LinkTarget__use_dbus
2692 endef
2694 endif # ENABLE_DBUS
2697 ifneq ($(SYSTEM_LIBPNG),)
2699 define gb_LinkTarget__use_libpng
2700 $(call gb_LinkTarget_set_include,$(1),\
2701 $$(INCLUDE) \
2702 $(LIBPNG_CFLAGS) \
2705 $(call gb_LinkTarget_add_libs,$(1),\
2706 $(LIBPNG_LIBS) \
2709 endef
2711 gb_ExternalProject__use_libpng :=
2713 else # !SYSTEM_LIBPNG
2715 define gb_LinkTarget__use_libpng
2716 $(call gb_LinkTarget_set_include,$(1),\
2717 $(LIBPNG_CFLAGS) \
2718 $$(INCLUDE) \
2720 $(call gb_LinkTarget_use_static_libraries,$(1),\
2721 libpng \
2723 $(call gb_LinkTarget__use_zlib,$(1))
2725 endef
2727 define gb_ExternalProject__use_libpng
2728 $(call gb_ExternalProject_use_static_libraries,$(1),\
2729 libpng \
2732 endef
2734 endif # !SYSTEM_LIBPNG
2737 ifneq ($(SYSTEM_CURL),)
2739 define gb_LinkTarget__use_curl
2740 $(call gb_LinkTarget_add_defs,$(1),\
2741 -DSYSTEM_CURL \
2743 $(call gb_LinkTarget_set_include,$(1),\
2744 $$(INCLUDE) \
2745 $(CURL_CFLAGS) \
2747 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2749 endef
2751 else # !SYSTEM_CURL
2753 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2754 curl \
2757 define gb_LinkTarget__use_curl
2758 $(call gb_LinkTarget_use_package,$(1),curl)
2759 $(call gb_LinkTarget_set_include,$(1),\
2760 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2761 $$(INCLUDE) \
2764 ifeq ($(COM),MSC)
2765 $(call gb_LinkTarget_add_libs,$(1),\
2766 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-ipv6-sspi-schannel/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
2768 else
2769 $(call gb_LinkTarget_add_libs,$(1),\
2770 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2772 endif
2774 endef
2776 endif # SYSTEM_CURL
2778 ifeq ($(ENABLE_VALGRIND),TRUE)
2780 define gb_LinkTarget__use_valgrind
2781 $(call gb_LinkTarget_add_defs,$(1),\
2782 -DHAVE_VALGRIND_HEADERS \
2785 $(call gb_LinkTarget_set_include,$(1),\
2786 $$(INCLUDE) \
2787 $(VALGRIND_CFLAGS) \
2790 endef
2792 else # !ENABLE_VALGRIND
2794 define gb_LinkTarget__use_valgrind
2796 endef
2798 endif # ENABLE_VALGRIND
2800 ifeq ($(ENABLE_POPPLER),TRUE)
2802 ifneq ($(SYSTEM_POPPLER),)
2804 define gb_LinkTarget__use_poppler
2805 $(call gb_LinkTarget_set_include,$(1),\
2806 $(POPPLER_CFLAGS) \
2807 $$(INCLUDE) \
2810 $(call gb_LinkTarget_add_libs,$(1),\
2811 $(POPPLER_LIBS) \
2814 endef
2816 else # !SYSTEM_POPPLER
2818 define gb_LinkTarget__use_poppler
2819 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2820 $(call gb_LinkTarget_use_package,$(1),poppler_data)
2821 $(call gb_LinkTarget_set_include,$(1),\
2822 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2823 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2824 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2825 $$(INCLUDE) \
2828 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2830 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2832 ifeq ($(OS),MACOSX)
2833 $(call gb_LinkTarget_add_libs,$(1),\
2834 -lobjc \
2836 else ifeq ($(OS),LINUX)
2837 $(call gb_LinkTarget_add_libs,$(1),\
2838 -pthread \
2840 else ifeq ($(OS),WNT)
2841 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2842 advapi32 \
2843 gdi32 \
2845 endif
2847 endef
2849 endif # SYSTEM_POPPLER
2851 endif # ENABLE_POPPLER
2854 ifneq ($(SYSTEM_CLUCENE),)
2856 define gb_LinkTarget__use_clucene
2857 $(call gb_LinkTarget_add_defs,$(1),\
2858 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2861 $(call gb_LinkTarget_set_include,$(1),\
2862 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2863 $$(INCLUDE) \
2866 $(call gb_LinkTarget_add_libs,$(1),\
2867 $(CLUCENE_LIBS) \
2870 endef
2872 else # !SYSTEM_CLUCENE
2874 define gb_LinkTarget__use_clucene
2875 $(call gb_LinkTarget_set_include,$(1),\
2876 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2877 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2878 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2879 $$(INCLUDE) \
2882 $(call gb_LinkTarget_use_libraries,$(1),\
2883 clucene \
2886 endef
2888 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2889 clucene \
2892 endif # SYSTEM_CLUCENE
2894 define gb_LinkTarget__use_gobject
2895 $(call gb_LinkTarget_add_libs,$(1),\
2896 $(GOBJECT_LIBS) \
2899 $(call gb_LinkTarget_set_include,$(1),\
2900 $$(INCLUDE) \
2901 $(GOBJECT_CFLAGS) \
2903 endef
2905 ifneq ($(SYSTEM_HSQLDB),)
2907 define gb_LinkTarget__use_hsqldb
2909 $(call gb_LinkTarget_add_defs,$(1),\
2910 -DSYSTEM_HSQLDB \
2911 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2914 endef
2916 else # !SYSTEM_HSQLDB
2918 define gb_LinkTarget__use_hsqldb
2920 endef
2922 endif # SYSTEM_HSQLDB
2924 ifeq ($(ENABLE_LDAP),TRUE)
2925 ifneq ($(SYSTEM_OPENLDAP),)
2927 define gb_LinkTarget__use_openldap
2929 $(call gb_LinkTarget_add_libs,$(1),\
2930 -lldap \
2931 -llber \
2934 endef
2936 gb_ExternalProject__use_openldap :=
2938 else # !SYSTEM_OPENLDAP
2940 define gb_LinkTarget__use_openldap
2941 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2942 $(call gb_LinkTarget_set_include,$(1),\
2943 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2944 $$(INCLUDE) \
2946 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2947 $(call gb_LinkTarget_add_libs,$(1), \
2948 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2949 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2952 endef
2953 endif
2955 define gb_ExternalProject__use_openldap
2956 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2958 endef
2960 endif # SYSTEM_OPENLDAP
2962 ifneq ($(SYSTEM_LIBTOMMATH),)
2964 define gb_LinkTarget__use_libtommath
2965 $(call gb_LinkTarget_set_include,$(1),\
2966 $(LIBTOMMATH_CFLAGS) \
2967 $$(INCLUDE) \
2969 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2971 endef
2973 else # !SYSTEM_LIBTOMMATH
2974 define gb_LinkTarget__use_libtommath
2975 $(call gb_LinkTarget_set_include,$(1),\
2976 -I${WORKDIR}/UnpackedTarball/libtommath \
2977 $$(INCLUDE) \
2979 $(call gb_LinkTarget_add_libs,$(1),\
2980 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2982 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2984 endef
2986 endif # SYSTEM_LIBTOMMATH
2988 define gb_ExternalProject__use_libtommath
2989 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2991 endef
2993 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2995 ifneq ($(SYSTEM_FIREBIRD),)
2997 define gb_LinkTarget__use_libfbembed
2998 $(call gb_LinkTarget_set_include,$(1),\
2999 $(FIREBIRD_CFLAGS) \
3000 $$(INCLUDE) \
3002 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
3004 endef
3006 else # !SYSTEM_FIREBIRD
3008 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
3009 firebird \
3012 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3013 #$(call gb_LinkTarget__use_libtommath,$(1))
3015 define gb_LinkTarget__use_libfbembed
3016 $(call gb_LinkTarget_use_package,$(1),firebird)
3017 $(call gb_LinkTarget_set_include,$(1),\
3018 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3019 $$(INCLUDE) \
3021 ifeq ($(COM),MSC)
3022 $(call gb_LinkTarget_add_libs,$(1),\
3023 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3025 else
3026 $(call gb_LinkTarget_add_libs,$(1),\
3027 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3029 endif
3031 endef
3034 # endef
3036 endif # SYSTEM_FIREBIRD
3038 else # !ENABLE_FIREBIRD_SDBC
3040 gb_LinkTarget__use_firebird :=
3041 # gb_LinkTarget__use_atomic_ops :=
3042 # gb_LinkTarget__use_libtommath :=
3044 endif # ENABLE_FIREBIRD_SDBC
3047 ifneq ($(SYSTEM_POSTGRESQL),)
3049 define gb_LinkTarget__use_postgresql
3051 $(call gb_LinkTarget_set_include,$(1),\
3052 $(POSTGRESQL_INC) \
3053 $$(INCLUDE) \
3056 $(call gb_LinkTarget_add_libs,$(1),\
3057 -lpq \
3060 $(call gb_LinkTarget_add_ldflags,$(1),\
3061 $(POSTGRESQL_LIB) \
3064 endef
3066 else # !SYSTEM_POSTGRESQL
3068 ifeq ($(OS),WNT)
3069 $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
3070 postgresql \
3072 endif # WNT
3074 define gb_LinkTarget__use_postgresql
3076 $(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
3078 $(call gb_LinkTarget_set_include,$(1),\
3079 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3080 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3081 $$(INCLUDE) \
3084 ifeq ($(OS),WNT)
3086 $(call gb_LinkTarget_add_libs,$(1),\
3087 $(call gb_UnpackedTarball_get_dir,postgresql)/$(gb_MSBUILD_CONFIG)/libpq/libpq.lib \
3090 else # !WNT
3092 $(call gb_LinkTarget_add_libs,$(1),\
3093 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3094 $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
3095 $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
3096 $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
3099 endif # !WNT
3101 endef # gb_LinkTarget__use_postgresql
3103 endif # !SYSTEM_POSTGRESQL
3105 ifeq ($(ENABLE_KF5),TRUE)
3107 define gb_LinkTarget__use_kf5
3108 $(call gb_LinkTarget_set_include,$(1),\
3109 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3110 $$(INCLUDE) \
3113 $(call gb_LinkTarget_add_cxxflags,$(1),\
3114 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3117 $(call gb_LinkTarget_add_libs,$(1),\
3118 $(KF5_LIBS) \
3121 endef
3123 else # !ENABLE_KF5
3125 define gb_LinkTarget__use_kf5
3127 endef
3129 endif # ENABLE_KF5
3133 ifeq ($(ENABLE_QT5),TRUE)
3135 define gb_LinkTarget__use_qt5
3136 $(call gb_LinkTarget_set_include,$(1),\
3137 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3138 $$(INCLUDE) \
3141 $(call gb_LinkTarget_add_defs,$(1),\
3142 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3145 $(call gb_LinkTarget_add_libs,$(1),\
3146 $(QT5_LIBS) \
3149 endef
3151 else # !ENABLE_QT5
3153 define gb_LinkTarget__use_qt5
3155 endef
3157 endif # ENABLE_QT5
3159 ifeq ($(ENABLE_QT6),TRUE)
3161 define gb_LinkTarget__use_qt6
3162 $(call gb_LinkTarget_set_include,$(1),\
3163 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS)))) \
3164 $$(INCLUDE) \
3167 $(call gb_LinkTarget_add_defs,$(1),\
3168 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT6_CFLAGS))) \
3171 $(call gb_LinkTarget_add_libs,$(1),\
3172 $(QT6_LIBS) \
3175 endef
3177 else # !ENABLE_QT6
3179 define gb_LinkTarget__use_qt6
3181 endef
3183 endif # ENABLE_QT6
3186 # PYTHON
3187 # extra python_headers external because pyuno wrapper must not link python
3188 ifneq ($(SYSTEM_PYTHON),)
3190 define gb_LinkTarget__use_python_headers
3191 $(call gb_LinkTarget_add_defs,$(1),\
3192 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3195 $(call gb_LinkTarget_set_include,$(1),\
3196 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3197 $$(INCLUDE) \
3200 endef
3202 define gb_LinkTarget__use_python
3203 $(call gb_LinkTarget__use_python_headers,$(1))
3205 $(call gb_LinkTarget_add_libs,$(1),\
3206 $(PYTHON_LIBS) \
3209 endef
3211 else # !SYSTEM_PYTHON
3213 $(eval $(call gb_Helper_register_packages_for_install,python,\
3214 python3 \
3215 $(if $(filter WNT,$(OS)),libffi) \
3218 define gb_LinkTarget__use_python_headers
3219 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3220 $(call gb_LinkTarget_set_include,$(1),\
3221 -I$(call gb_UnpackedTarball_get_dir,python3) \
3222 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3223 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3224 $$(INCLUDE) \
3227 endef
3229 define gb_LinkTarget__use_python
3230 $(call gb_LinkTarget__use_python_headers,$(1))
3231 ifeq ($(OS),MACOSX)
3232 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3233 else
3234 $(call gb_LinkTarget_use_package,$(1),python3)
3235 endif
3237 ifeq ($(OS),WNT)
3238 ifeq ($(CPUNAME),X86_64)
3239 python_arch_subdir=amd64
3240 else ifeq ($(CPUNAME),AARCH64)
3241 python_arch_subdir=arm64
3242 else
3243 python_arch_subdir=win32
3244 endif
3245 $(call gb_LinkTarget_add_libs,$(1),\
3246 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(python_arch_subdir)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3248 else ifeq ($(OS),MACOSX)
3249 $(call gb_LinkTarget_add_libs,$(1),\
3250 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3252 else
3253 $(call gb_LinkTarget_add_libs,$(1),\
3254 -L$(call gb_UnpackedTarball_get_dir,python3) \
3255 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if $(ENABLE_DBGUTIL),d) \
3257 endif
3259 endef
3261 # this is only used by python currently
3262 define gb_ExternalProject__use_libffi
3263 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3265 endef
3267 endif # SYSTEM_PYTHON
3269 # ORCUS
3270 ifneq ($(SYSTEM_LIBORCUS),)
3272 define gb_LinkTarget__use_orcus
3273 $(call gb_LinkTarget_set_include,$(1),\
3274 $$(INCLUDE) \
3275 $(ORCUS_CFLAGS) \
3277 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3278 endef
3280 define gb_LinkTarget__use_orcus-parser
3282 endef
3284 else # !SYSTEM_LIBORCUS
3286 ifeq ($(COM),MSC)
3288 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3289 orcus \
3290 orcus-parser \
3293 define gb_LinkTarget__use_orcus
3294 $(call gb_LinkTarget_set_include,$(1),\
3295 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3296 $$(INCLUDE) \
3299 $(call gb_LinkTarget_use_libraries,$(1),\
3300 orcus \
3303 endef
3305 define gb_LinkTarget__use_orcus-parser
3306 $(call gb_LinkTarget_set_include,$(1),\
3307 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3308 $$(INCLUDE) \
3311 $(call gb_LinkTarget_use_libraries,$(1),\
3312 orcus-parser \
3315 endef
3317 else # !MSC
3319 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3320 liborcus \
3323 define gb_LinkTarget__use_orcus
3324 $(call gb_LinkTarget_use_package,$(1),liborcus)
3326 $(call gb_LinkTarget_set_include,$(1),\
3327 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3328 $$(INCLUDE) \
3331 $(call gb_LinkTarget_add_libs,$(1),\
3332 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.16 \
3335 $(if $(SYSTEM_BOOST), \
3336 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3337 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3340 endef
3342 define gb_LinkTarget__use_orcus-parser
3343 $(call gb_LinkTarget_use_package,$(1),liborcus)
3345 $(call gb_LinkTarget_set_include,$(1),\
3346 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3347 $$(INCLUDE) \
3350 $(call gb_LinkTarget_add_libs,$(1),\
3351 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.16 \
3354 endef
3356 endif # MSC
3358 endif # SYSTEM_LIBORCUS
3360 ifeq ($(ENABLE_EOT),TRUE)
3362 ifneq ($(SYSTEM_LIBEOT),)
3364 define gb_LinkTarget__use_libeot
3365 $(call gb_LinkTarget_set_include,$(1),\
3366 $$(INCLUDE) \
3367 $(LIBEOT_CFLAGS) \
3369 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3371 endef
3373 gb_ExternalProject__use_libeot :=
3375 else # !SYSTEM_LIBEOT
3377 define gb_LinkTarget__use_libeot
3378 $(call gb_LinkTarget_set_include,$(1),\
3379 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3380 $$(INCLUDE) \
3382 $(call gb_LinkTarget_add_libs,$(1),\
3383 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3385 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3387 endef
3389 define gb_ExternalProject__use_libeot
3390 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3392 endef
3394 endif # SYSTEM_LIBEOT
3396 else # !ENABLE_EOT
3398 gb_LinkTarget__use_libeot :=
3399 gb_ExternalProject__use_libeot :=
3401 endif # ENABLE_EOT
3403 ### X11 stuff ###
3405 ifeq ($(USING_X11), TRUE)
3407 define gb_LinkTarget__use_Xrandr
3408 $(call gb_LinkTarget_set_include,$(1),\
3409 $$(INCLUDE) \
3410 $(XRANDR_CFLAGS) \
3413 $(call gb_LinkTarget_add_libs,$(1),\
3414 $(XRANDR_LIBS) \
3416 endef
3418 define gb_LinkTarget__use_Xrender
3419 $(call gb_LinkTarget_set_include,$(1),\
3420 $$(INCLUDE) \
3421 $(XRENDER_CFLAGS) \
3424 $(call gb_LinkTarget_add_libs,$(1),\
3425 $(XRENDER_LIBS) \
3427 endef
3429 endif # USING_X11
3432 gb_ExternalProject__use_nss3:=
3435 ifneq ($(SYSTEM_NSS),)
3437 define gb_LinkTarget__use_nss3
3438 $(call gb_LinkTarget_add_defs,$(1),\
3439 -DSYSTEM_NSS \
3442 $(call gb_LinkTarget_set_include,$(1),\
3443 $$(INCLUDE) \
3444 $(NSS_CFLAGS) \
3447 $(call gb_LinkTarget_add_libs,$(1),\
3448 $(NSS_LIBS) \
3451 endef
3453 define gb_LinkTarget__use_nssutil3
3454 $(call gb_LinkTarget__use_nss3,$(1))
3456 endef
3458 define gb_LinkTarget__use_plc4
3459 $(call gb_LinkTarget__use_nss3,$(1))
3461 endef
3463 define gb_LinkTarget__use_ssl3
3464 $(call gb_LinkTarget__use_nss3,$(1))
3466 endef
3468 else # !SYSTEM_NSS
3470 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3471 nss \
3474 define gb_LinkTarget__use_nss3
3475 $(call gb_LinkTarget_use_package,$(1),nss)
3476 $(call gb_LinkTarget_set_include,$(1),\
3477 $$(INCLUDE) \
3478 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3479 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3482 ifeq ($(COM),MSC)
3483 $(call gb_LinkTarget_add_libs,$(1),\
3484 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3485 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3486 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3488 else
3489 $(call gb_LinkTarget_add_libs,$(1),\
3490 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3491 -lnspr4 \
3492 -lnss3 \
3493 -lsmime3 \
3495 endif
3497 endef
3499 define gb_LinkTarget__use_plc4
3500 $(call gb_LinkTarget_use_package,$(1),nss)
3501 ifeq ($(COM),MSC)
3502 $(call gb_LinkTarget_add_libs,$(1),\
3503 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3505 else
3506 $(call gb_LinkTarget_add_libs,$(1),\
3507 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3509 endif
3511 endef
3513 define gb_LinkTarget__use_ssl3
3514 $(call gb_LinkTarget_use_package,$(1),nss)
3515 ifeq ($(COM),MSC)
3516 $(call gb_LinkTarget_add_libs,$(1),\
3517 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3519 else
3520 $(call gb_LinkTarget_add_libs,$(1),\
3521 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3523 endif
3525 endef
3527 define gb_LinkTarget__use_nssutil3
3528 $(call gb_LinkTarget_use_package,$(1),nss)
3529 $(call gb_LinkTarget_set_include,$(1),\
3530 $$(INCLUDE) \
3531 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3532 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3535 ifeq ($(COM),MSC)
3536 $(call gb_LinkTarget_add_libs,$(1),\
3537 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nssutil3.lib \
3539 else
3540 $(call gb_LinkTarget_add_libs,$(1),\
3541 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3542 -lnssutil3 \
3544 endif
3546 endef
3548 define gb_ExternalProject__use_nss3
3549 $(call gb_ExternalProject_use_package,$(1),nss)
3551 endef
3553 endif # SYSTEM_NSS
3555 ifeq ($(ENABLE_BREAKPAD),TRUE)
3557 define gb_LinkTarget__use_breakpad
3558 $(call gb_LinkTarget_set_include,$(1),\
3559 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3560 $$(INCLUDE) \
3563 ifeq ($(COM),MSC)
3564 $(call gb_LinkTarget_use_static_libraries,$(1),\
3565 breakpad \
3567 else
3568 $(call gb_LinkTarget_add_libs,$(1),\
3569 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3571 endif
3573 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3575 endef
3577 endif # ENABLE_BREAKPAD
3579 ifeq ($(ENABLE_GPGMEPP),TRUE)
3581 ifneq ($(SYSTEM_GPGMEPP),)
3583 gb_ExternalProject__use_gpgmepp:=
3584 gb_ExternalProject__use_libassuan:=
3585 gb_ExternalProject__use_libgpg-error:=
3587 define gb_LinkTarget__use_gpgmepp
3588 $(call gb_LinkTarget_set_include,$(1),\
3589 $$(INCLUDE) \
3590 $$(GPGMEPP_CFLAGS) \
3593 $(call gb_LinkTarget_add_libs,$(1),\
3594 $(GPGMEPP_LIBS) \
3597 endef
3599 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3601 define gb_ExternalProject__use_gpgmepp
3602 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3604 endef
3605 define gb_ExternalProject__use_libassuan
3606 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3608 endef
3609 define gb_ExternalProject__use_libgpg-error
3610 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3612 endef
3614 ifneq ($(filter WNT,$(OS)),)
3616 define gb_LinkTarget__use_libgpg-error
3617 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3619 $(call gb_LinkTarget_set_include,$(1),\
3620 $(GPG_ERROR_CFLAGS) \
3621 $$(INCLUDE) \
3623 $(call gb_LinkTarget_add_libs,$(1),\
3624 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3627 endef
3629 define gb_LinkTarget__use_libassuan
3630 $(call gb_LinkTarget_use_package,$(1),libassuan)
3632 $(call gb_LinkTarget_set_include,$(1),\
3633 $(LIBASSUAN_CFLAGS) \
3634 $$(INCLUDE) \
3636 $(call gb_LinkTarget_add_libs,$(1),\
3637 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3640 endef
3642 define gb_LinkTarget__use_gpgmepp
3643 $(call gb_LinkTarget_set_include,$(1),\
3644 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3645 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3646 $$(GPG_ERROR_CFLAGS) \
3647 $$(INCLUDE) \
3649 $(call gb_LinkTarget_use_libraries,$(1),\
3650 gpgmepp \
3653 endef
3655 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3656 gpgmepp \
3657 libassuan \
3658 libgpg-error \
3661 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3662 gpgmepp \
3665 endif
3667 ifneq ($(filter MACOSX LINUX,$(OS)),)
3669 define gb_LinkTarget__use_gpgmepp
3670 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3672 $(call gb_LinkTarget_set_include,$(1),\
3673 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3674 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3675 $$(GPG_ERROR_CFLAGS) \
3676 $$(INCLUDE) \
3678 $(call gb_LinkTarget_add_libs,$(1),\
3679 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3680 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3681 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3682 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3685 endef
3687 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3688 gpgmepp \
3689 libassuan \
3690 libgpg-error \
3693 endif
3695 endif
3697 else # !ENABLE_GPGMEPP
3699 gb_ExternalProject__use_gpgmepp :=
3700 gb_ExternalProject__use_libassuan :=
3701 gb_ExternalProject__use_libgpg-error :=
3703 gb_LinkTarget__use_gpgmepp :=
3704 gb_LinkTarget__use_libassuan :=
3705 gb_LinkTarget__use_libgpg-error :=
3707 endif # ENABLE_GPGMEPP
3709 define gb_LinkTarget__use_dconf
3710 $(call gb_LinkTarget_set_include,$(1),\
3711 $$(INCLUDE) \
3712 $(DCONF_CFLAGS) \
3715 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3716 endef
3718 ### Jars ############################################################
3720 ifneq ($(SYSTEM_HSQLDB),)
3722 define gb_Jar__use_hsqldb
3723 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3724 endef
3725 define gb_JunitTest__use_hsqldb
3726 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3727 endef
3729 else # !SYSTEM_HSQLDB
3731 ifeq ($(ENABLE_JAVA),TRUE)
3732 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3733 hsqldb \
3735 endif
3737 define gb_Jar__use_hsqldb
3738 $(call gb_Jar_use_jar,$(1),hsqldb)
3739 endef
3740 define gb_JunitTest__use_hsqldb
3741 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3742 endef
3744 endif # SYSTEM_HSQLDB
3747 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3749 ifneq ($(SYSTEM_BSH),)
3751 define gb_Jar__use_bsh
3752 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3753 endef
3755 else # !SYSTEM_BSH
3757 ifeq ($(ENABLE_JAVA),TRUE)
3758 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3759 bsh \
3761 endif
3763 define gb_Jar__use_bsh
3764 $(call gb_Jar_use_jar,$(1),bsh)
3765 endef
3767 endif # SYSTEM_BSH
3769 endif
3771 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3773 ifneq ($(SYSTEM_RHINO),)
3775 define gb_Jar__use_rhino
3776 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3777 endef
3779 else # !SYSTEM_RHINO
3781 ifeq ($(ENABLE_JAVA),TRUE)
3782 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3783 js \
3785 endif
3787 define gb_Jar__use_rhino
3788 $(call gb_Jar_use_jar,$(1),js)
3789 endef
3791 endif # SYSTEM_RHINO
3793 endif
3795 ifneq ($(SYSTEM_JFREEREPORT),)
3797 define gb_Jar__use_flow-engine
3798 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3799 endef
3801 define gb_Jar__use_flute
3802 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3803 endef
3805 define gb_Jar__use_libbase
3806 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3807 endef
3809 define gb_Jar__use_libfonts
3810 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3811 endef
3813 define gb_Jar__use_libformula
3814 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3815 endef
3817 define gb_Jar__use_liblayout
3818 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3819 endef
3821 define gb_Jar__use_libloader
3822 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3823 endef
3825 define gb_Jar__use_librepository
3826 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3827 endef
3829 define gb_Jar__use_libserializer
3830 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3831 endef
3833 define gb_Jar__use_libxml
3834 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3835 endef
3837 define gb_Jar__use_sac
3838 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3839 endef
3841 else # !SYSTEM_JFREEREPORT
3843 ifeq ($(ENABLE_JAVA),TRUE)
3844 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3845 flow-engine \
3846 flute-1.1.6 \
3847 libbase-1.1.6 \
3848 libfonts-1.1.6 \
3849 libformula-1.1.7 \
3850 liblayout \
3851 libloader-1.1.6 \
3852 librepository-1.1.6 \
3853 libserializer-1.1.6 \
3854 libxml-1.1.7 \
3855 sac \
3857 endif
3859 define gb_Jar__use_flow-engine
3860 $(call gb_Jar_use_jar,$(1),flow-engine)
3861 endef
3863 define gb_Jar__use_flute
3864 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3865 endef
3867 define gb_Jar__use_libbase
3868 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3869 endef
3871 define gb_Jar__use_libfonts
3872 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3873 endef
3875 define gb_Jar__use_libformula
3876 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3877 endef
3879 define gb_Jar__use_liblayout
3880 $(call gb_Jar_use_jar,$(1),liblayout)
3881 endef
3883 define gb_Jar__use_libloader
3884 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3885 endef
3887 define gb_Jar__use_librepository
3888 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3889 endef
3891 define gb_Jar__use_libserializer
3892 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3893 endef
3895 define gb_Jar__use_libxml
3896 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3897 endef
3899 define gb_Jar__use_sac
3900 $(call gb_Jar_use_jar,$(1),sac)
3901 endef
3903 endif # SYSTEM_JFREEREPORT
3906 # Executables
3908 define gb_Executable__register_bestreversemap
3909 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3910 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target_for_build,sal_textenc))) \
3912 endef
3914 # TODO depending on the whole URE might be overkill, but I do not have a
3915 # Windows machine to debug it...
3916 define gb_Executable__register_climaker
3917 $(call gb_Executable_add_runtime_dependencies,climaker,\
3918 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3919 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3920 $(call gb_UnoApi_get_target_for_build,udkapi) \
3921 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3923 endef
3925 define gb_Executable__register_cppumaker
3926 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3927 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3929 endef
3931 # This is used to determine what we need for 'build' platform.
3932 define gb_Executable__register_gengal
3933 $(call gb_Executable_add_runtime_dependencies,gengal,\
3934 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3935 $(call gb_Library_get_target_for_build,localedata_en) \
3936 $(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
3937 $(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
3938 $(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
3939 $(call gb_Package_get_target_for_build,postprocess_registry) \
3940 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3941 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3942 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3943 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3944 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3945 $(call gb_UnoApi_get_target_for_build,offapi) \
3946 $(call gb_UnoApi_get_target_for_build,udkapi) \
3948 endef
3950 ifeq ($(SYSTEM_ICU),)
3952 define gb_Executable__register_gendict
3953 $(call gb_Executable_add_runtime_dependencies,gendict,\
3954 $(call gb_Package_get_target_for_build,icu) \
3955 $(call gb_Package_get_target_for_build,icu_ure) \
3957 endef
3959 endif
3961 define gb_Executable__register_idlc
3962 $(call gb_Executable_add_runtime_dependencies,idlc,\
3963 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3965 endef
3967 define gb_Executable__register_localize
3968 $(call gb_Executable_add_runtime_dependencies,localize,\
3969 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3970 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3973 endef
3975 # FIXME ure/services.rdb needs cleanup
3976 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3977 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3978 define gb_Executable__register_saxparser
3979 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3980 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3981 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3982 $(call gb_Rdb_get_target_for_build,saxparser) \
3983 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3984 $(call gb_UnoApi_get_target_for_build,udkapi) \
3986 endef
3988 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3989 # required due to the settings for URE_SERVICES and URE_TYPES in
3990 # cppuhelper/source/unorc
3991 define gb_Executable__register_uno
3992 $(call gb_Executable_add_runtime_dependencies,uno,\
3993 $(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
3994 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3995 $(call gb_UnoApi_get_target_for_build,udkapi) \
3997 endef
4000 # External executables
4002 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
4004 gb_ExternalExecutable__register_xmllint :=
4006 else # ! SYSTEM_LIBXML_FOR_BUILD
4008 define gb_ExternalExecutable__register_xmllint
4009 $(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)
4010 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
4011 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4012 $(call gb_Package_get_target,libxml2) \
4015 endef
4017 endif # SYSTEM_LIBXML_FOR_BUILD
4019 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
4021 gb_ExternalExecutable__register_xsltproc :=
4023 else # ! SYSTEM_LIBXSLT_FOR_BUILD
4025 define gb_ExternalExecutable__register_xsltproc
4026 $(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)
4027 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
4028 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4029 $(call gb_Package_get_target,libxml2) \
4030 $(call gb_Package_get_target,libxslt) \
4033 endef
4035 endif # SYSTEM_LIBXSLT_FOR_BUILD
4037 ifneq (,$(SYSTEM_UCPP))
4039 gb_ExternalExecutable__register_ucpp :=
4041 else # ! SYSTEM_UCPP
4043 define gb_ExternalExecutable__register_ucpp
4044 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
4046 endef
4048 endif # SYSTEM_UCPP
4050 ifeq (,$(PYTHON_FOR_BUILD))
4052 define gb_ExternalExecutable__register_python
4053 ifeq ($(OS),MACOSX)
4055 # use set_external, to avoid having the command added as prerequisite for the
4056 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4057 # matching rule to build that specific file)
4058 $(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))
4059 # the Zip ensures that internal python has been built (cannot use the Package
4060 # target, as that is not used on Mac)
4061 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4063 else
4065 $(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))
4066 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4067 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4069 endif
4071 endef
4073 else
4075 define gb_ExternalExecutable__register_python
4076 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4078 endef
4080 endif # PYTHON_FOR_BUILD
4082 ifneq ($(SYSTEM_GENBRK),)
4084 define gb_ExternalExecutable__register_genbrk
4085 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4087 endef
4089 else # ! SYSTEM_GENBRK
4091 define gb_ExternalExecutable__register_genbrk
4092 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4093 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4094 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4095 $(call gb_Package_get_target_for_build,icu) \
4096 $(call gb_Package_get_target_for_build,icu_ure) \
4099 endef
4101 endif
4103 ifneq ($(SYSTEM_GENCCODE),)
4105 define gb_ExternalExecutable__register_genccode
4106 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4108 endef
4110 else # ! SYSTEM_GENCCODE
4112 define gb_ExternalExecutable__register_genccode
4113 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4114 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4115 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4116 $(call gb_Package_get_target_for_build,icu) \
4117 $(call gb_Package_get_target_for_build,icu_ure) \
4120 endef
4122 endif
4124 ifneq ($(SYSTEM_GENCMN),)
4126 define gb_ExternalExecutable__register_gencmn
4127 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4129 endef
4131 else # ! SYSTEM_GENCMN
4133 define gb_ExternalExecutable__register_gencmn
4134 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4135 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4136 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4137 $(call gb_Package_get_target_for_build,icu) \
4138 $(call gb_Package_get_target_for_build,icu_ure) \
4141 endef
4143 endif
4145 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4146 ifneq ($(SYSTEM_BZIP2),)
4148 define gb_LinkTarget__use_bzip2
4149 $(call gb_LinkTarget_set_include,$(1),\
4150 $(BZIP2_CFLAGS) \
4151 $$(INCLUDE) \
4153 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4155 endef
4157 gb_ExternalProject__use_bzip2 :=
4159 else # !SYSTEM_BZIP2
4161 define gb_LinkTarget__use_bzip2
4162 $(call gb_LinkTarget_set_include,$(1),\
4163 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4164 $$(INCLUDE) \
4167 ifeq ($(COM),MSC)
4168 $(call gb_LinkTarget_add_libs,$(1),\
4169 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4171 else
4172 $(call gb_LinkTarget_add_libs,$(1),\
4173 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4175 endif
4177 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4178 endef
4180 define gb_ExternalProject__use_bzip2
4181 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4182 endef
4184 endif
4185 endif
4187 define gb_LinkTarget__use_clew
4188 $(call gb_LinkTarget_set_include,$(1), \
4189 -I$(SRCDIR)/external/clew/source/include \
4190 $$(INCLUDE) \
4192 $(call gb_LinkTarget_use_libraries,$(1),clew)
4193 endef
4195 ifneq ($(ENABLE_PDFIUM),)
4196 define gb_LinkTarget__use_pdfium
4197 $(call gb_LinkTarget_set_include,$(1),\
4198 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4199 -DCOMPONENT_BUILD \
4200 $$(INCLUDE) \
4202 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4203 endef
4204 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4205 pdfium \
4207 endif
4209 define gb_LinkTarget__use_dtoa
4210 $(call gb_LinkTarget_use_unpacked,$(1),dtoa)
4211 $(call gb_LinkTarget_set_include,$(1),\
4212 -I$(call gb_UnpackedTarball_get_dir,dtoa/include/)\
4213 $$(INCLUDE) \
4215 $(call gb_LinkTarget_use_static_libraries,$(1),\
4216 dtoa \
4219 endef
4221 define gb_ExternalProject__use_dtoa
4222 $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
4224 endef
4226 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4227 $(if $(UCRT_REDISTDIR),ucrt) \
4230 ifneq ($(SYSTEM_BOX2D),)
4232 define gb_LinkTarget__use_box2d
4233 $(call gb_LinkTarget_set_include,$(1),\
4234 -DSYSTEM_BOX2D \
4235 $$(INCLUDE) \
4236 $(BOX2D_CFLAGS) \
4238 $(call gb_LinkTarget_add_libs,$(1),$(BOX2D_LIBS))
4240 endef
4242 gb_ExternalProject__use_box2d :=
4244 else # !SYSTEM_BOX2D
4246 define gb_LinkTarget__use_box2d
4247 $(call gb_LinkTarget_use_unpacked,$(1),box2d)
4248 $(call gb_LinkTarget_set_include,$(1),\
4249 -I$(call gb_UnpackedTarball_get_dir,box2d/Box2D/)\
4250 $$(INCLUDE) \
4252 $(call gb_LinkTarget_use_static_libraries,$(1),\
4253 box2d \
4256 endef
4258 define gb_ExternalProject__use_box2d
4259 $(call gb_ExternalProject_use_static_libraries,$(1),box2d)
4261 endef
4263 endif # SYSTEM_BOX2D
4265 ifneq ($(SYSTEM_ZXING),)
4267 define gb_LinkTarget__use_zxing
4268 $(call gb_LinkTarget_set_include,$(1),\
4269 -DSYSTEM_ZXING \
4270 $$(INCLUDE) \
4271 $(ZXING_CFLAGS) \
4273 $(call gb_LinkTarget_add_libs,$(1),$(ZXING_LIBS))
4275 endef
4277 gb_ExternalProject__use_zxing :=
4279 else # !SYSTEM_ZXING
4281 ifneq ($(ENABLE_ZXING),)
4283 define gb_LinkTarget__use_zxing
4284 $(call gb_LinkTarget_use_unpacked,$(1),zxing)
4285 $(call gb_LinkTarget_set_include,$(1),\
4286 -I$(call gb_UnpackedTarball_get_dir,zxing/core/src/)\
4287 $$(INCLUDE) \
4289 $(call gb_LinkTarget_use_static_libraries,$(1),\
4290 zxing \
4293 endef
4295 define gb_ExternalProject__use_zxing
4296 $(call gb_ExternalProject_use_static_libraries,$(1),zxing)
4298 endef
4300 else # !ENABLE_ZXING
4302 define gb_LinkTarget__use_zxing
4303 endef
4305 endif # ENABLE_ZXING
4307 endif # SYSTEM_ZXING
4311 ifneq ($(SYSTEM_CUCKOO),)
4313 gb_ExternalProject__use_cuckoo_headers :=
4315 define gb_LinkTarget__use_cuckoo_headers
4316 $(call gb_LinkTarget_set_include,$(1),\
4317 -I$(call gb_UnpackedTarball_get_dir,cuckoo) \
4318 $$(INCLUDE) \
4321 endef
4323 else # !SYSTEM_CUCKOO
4325 define gb_ExternalProject__use_cuckoo_headers
4326 $(call gb_ExternalProject_use_unpacked,$(1),cuckoo)
4328 endef
4330 define gb_LinkTarget__use_cuckoo_headers
4331 $(call gb_LinkTarget_use_unpacked,$(1),cuckoo)
4332 $(call gb_LinkTarget_set_include,$(1),\
4333 -I$(call gb_UnpackedTarball_get_dir,cuckoo) \
4334 $$(INCLUDE) \
4337 endef
4339 endif # SYSTEM_CUCKOO
4342 # vim: set noet sw=4 ts=4: