Drop obsolete variable strings
[LibreOffice.git] / RepositoryExternal.mk
blob9cba1af4cb40f3c5832a663d8fe647241ce7827f
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 $$(INCLUDE) \
136 $(call gb_LinkTarget_use_libraries,$(1),skia)
137 $(call gb_LinkTarget_add_defs,$(1),\
138 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
139 -DSKIA_DLL \
141 endef
142 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
143 skia \
145 endif
147 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
149 define gb_LinkTarget__use_sane_headers
150 $(call gb_LinkTarget_set_include,$(1),\
151 $(if $(filter WNT,$(OS)), \
152 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
153 -I$(SRCDIR)/external/sane/inc) \
154 $$(INCLUDE) \
157 ifeq ($(OS),WNT)
158 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
159 endif
161 endef
163 else
165 gb_LinkTarget__use_sane_headers :=
167 endif
169 ifneq ($(SYSTEM_BLUEZ),)
171 gb_LinkTarget__use_bluez_bluetooth_headers :=
173 else # !SYSTEM_BLUEZ
175 define gb_LinkTarget__use_bluez_bluetooth_headers
176 $(call gb_LinkTarget_set_include,$(1),\
177 -I$(SRCDIR)/external/bluez_bluetooth/inc \
178 $$(INCLUDE) \
181 endef
183 endif # SYSTEM_BLUEZ
185 # External libraries
187 ifneq ($(SYSTEM_CPPUNIT),)
189 define gb_LinkTarget__use_cppunit
190 $(call gb_LinkTarget_set_include,$(1),\
191 $$(INCLUDE) \
192 $(CPPUNIT_CFLAGS) \
195 $(call gb_LinkTarget_add_libs,$(1),\
196 $(CPPUNIT_LIBS) \
199 endef
201 else # !SYSTEM_CPPUNIT
203 define gb_LinkTarget__use_cppunit
204 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
206 $(call gb_LinkTarget_set_include,$(1),\
207 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
208 $$(INCLUDE) \
211 ifeq ($(COM),MSC)
212 $(call gb_LinkTarget_add_libs,$(1),\
213 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
215 else
216 $(call gb_LinkTarget_add_libs,$(1),\
217 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
219 endif
221 endef
223 endif # SYSTEM_CPPUNIT
225 ifneq ($(SYSTEM_EPOXY),)
227 define gb_LinkTarget__use_epoxy
228 $(call gb_LinkTarget_set_include,$(1),\
229 $$(INCLUDE) \
230 $(EPOXY_CFLAGS) \
232 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
234 endef
236 gb_ExternalProject__use_epoxy :=
238 else # !SYSTEM_EPOXY
240 define gb_LinkTarget__use_epoxy
241 $(call gb_LinkTarget_set_include,$(1),\
242 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
243 $$(INCLUDE) \
246 $(call gb_LinkTarget_use_libraries,$(1),\
247 epoxy \
250 endef
252 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
253 epoxy \
256 define gb_ExternalProject__use_epoxy
257 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
259 endef
261 endif # SYSTEM_EPOXY
263 define gb_LinkTarget__use_iconv
264 ifeq ($(COM),MSC)
265 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
266 else
267 $(call gb_LinkTarget_add_libs,$(1),-liconv)
268 endif
269 endef
271 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
273 define gb_LinkTarget__use_mariadb-connector-c
274 $(call gb_LinkTarget_set_include,$(1),\
275 $$(INCLUDE) \
276 $(MARIADB_CFLAGS) \
278 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
280 endef
281 gb_ExternalProject__use_mariadb-connector-c :=
283 else # !SYSTEM_MARIADB_CONNECTOR_C
285 define gb_LinkTarget__use_mariadb-connector-c
286 $(call gb_LinkTarget_set_include,$(1),\
287 $$(INCLUDE) \
288 $(MARIADB_CFLAGS) \
290 $(call gb_LinkTarget_use_static_libraries,$(1),\
291 mariadb-connector-c \
293 ifeq ($(OS),MACOSX)
294 $(call gb_LinkTarget_add_libs,$(1),\
295 -liconv \
297 endif
299 endef
300 define gb_ExternalProject__use_mariadb-connector-c
301 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
303 endef
305 endif # SYSTEM_MARIADB_CONNECTOR_C
308 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
310 define gb_LinkTarget__use_mysql
312 $(call gb_LinkTarget_add_defs,$(1),\
313 -DSYSTEM_MARIADB \
316 $(call gb_LinkTarget_add_libs,$(1),\
317 $(MARIADB_LIBS) \
320 $(call gb_LinkTarget_set_include,$(1),\
321 $(MARIADB_CFLAGS) \
322 $$(INCLUDE) \
324 endef
326 else
328 define gb_LinkTarget__use_mysql
330 $(call gb_LinkTarget_set_include,$(1),\
331 $$(INCLUDE) \
334 endef
336 endif
338 ifneq ($(SYSTEM_ZLIB),)
340 define gb_LinkTarget__use_zlib
341 $(call gb_LinkTarget_add_defs,$(1),\
342 -DSYSTEM_ZLIB \
344 $(call gb_LinkTarget_add_libs,$(1),-lz)
346 endef
348 # nothing on system
349 define gb_LinkTarget__use_zlib_x64
351 endef
353 gb_ExternalProject__use_zlib :=
355 else # !SYSTEM_ZLIB
357 define gb_LinkTarget__use_zlib_multiarch
358 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
360 $(call gb_LinkTarget_set_include,$(1),\
361 $(ZLIB_CFLAGS) \
362 $$(INCLUDE) \
365 $(call gb_LinkTarget_use_static_libraries,$(1),\
366 $(2) \
369 endef
371 define gb_LinkTarget__use_zlib
372 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
374 endef
376 define gb_LinkTarget__use_zlib_x64
377 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
379 endef
381 define gb_ExternalProject__use_zlib
382 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
384 endef
386 endif # SYSTEM_ZLIB
389 ifneq ($(SYSTEM_LIBJPEG),)
391 define gb_LinkTarget__use_libjpeg
392 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
393 $(call gb_LinkTarget_set_ldflags,$(1),\
394 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
397 endef
399 gb_ExternalProject__use_libjpeg :=
401 else
403 define gb_LinkTarget__use_libjpeg
404 $(call gb_LinkTarget_set_include,$(1),\
405 $(LIBJPEG_CFLAGS) \
406 $$(INCLUDE) \
408 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
409 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
411 endef
413 define gb_ExternalProject__use_libjpeg
414 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
416 endef
418 endif # SYSTEM_LIBJPEG
420 ifneq ($(SYSTEM_MYTHES),)
422 define gb_LinkTarget__use_mythes
423 $(call gb_LinkTarget_set_include,$(1),\
424 $$(INCLUDE) \
425 $(MYTHES_CFLAGS) \
427 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
429 endef
431 else # !SYSTEM_MYTHES
433 define gb_LinkTarget__use_mythes
434 $(call gb_LinkTarget_set_include,$(1),\
435 -I$(call gb_UnpackedTarball_get_dir,mythes) \
436 $$(INCLUDE) \
439 ifeq ($(COM),MSC)
440 $(call gb_LinkTarget_use_static_libraries,$(1),\
441 mythes \
443 else
444 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
445 $(call gb_LinkTarget_use_external_project,$(1),mythes)
446 endif
448 endef
450 endif # SYSTEM_MYTHES
453 ifneq ($(SYSTEM_EXPAT),)
455 define gb_LinkTarget__use_expat_impl
456 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
458 $(call gb_LinkTarget_add_defs,$(1),\
459 -DSYSTEM_EXPAT \
462 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
464 endef
466 gb_ExternalProject__use_expat :=
468 else # !SYSTEM_EXPAT
470 define gb_LinkTarget__use_expat_impl
471 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
473 $(call gb_LinkTarget_set_include,$(1),\
474 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
475 $$(INCLUDE) \
478 $(call gb_LinkTarget_use_static_libraries,$(1),\
479 $(2) \
482 endef
484 define gb_ExternalProject__use_expat
485 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
487 endef
489 endif # SYSTEM_EXPAT
491 define gb_LinkTarget__use_expat
492 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
494 endef
496 define gb_LinkTarget__use_expat_x64
497 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
499 endef
501 ifneq ($(SYSTEM_HYPH),)
503 define gb_LinkTarget__use_hyphen
504 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
506 endef
508 else # !SYSTEM_HYPH
510 define gb_LinkTarget__use_hyphen
511 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
512 $(call gb_LinkTarget_set_include,$(1),\
513 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
514 $$(INCLUDE) \
517 ifeq ($(COM),MSC)
518 $(call gb_LinkTarget_use_static_libraries,$(1),\
519 hyphen \
521 else
522 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
523 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
524 endif
526 endef
528 endif # SYSTEM_HYPH
530 ifneq ($(SYSTEM_HUNSPELL),)
532 define gb_LinkTarget__use_hunspell
533 $(call gb_LinkTarget_set_include,$(1),\
534 $$(INCLUDE) \
535 $(HUNSPELL_CFLAGS) \
537 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
539 endef
541 gb_ExternalProject__use_hunspell :=
543 else # !SYSTEM_HUNSPELL
545 define gb_LinkTarget__use_hunspell
546 $(call gb_LinkTarget_add_defs,$(1),\
547 -DHUNSPELL_STATIC \
549 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
550 $(call gb_LinkTarget_set_include,$(1),\
551 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
552 $$(INCLUDE) \
555 ifeq ($(COM),MSC)
556 $(call gb_LinkTarget_use_static_libraries,$(1),\
557 hunspell \
559 else
560 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
561 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
562 endif
564 endef
566 define gb_ExternalProject__use_hunspell
567 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
569 endef
571 endif # SYSTEM_HUNSPELL
574 ifneq ($(SYSTEM_BOOST),)
576 define gb_LinkTarget__use_boost_lib
577 $(call gb_LinkTarget_set_include,$(1),\
578 $$(INCLUDE) \
579 $(BOOST_CPPFLAGS) \
582 $(call gb_LinkTarget_add_ldflags,$(1),\
583 $(BOOST_LDFLAGS) \
586 $(call gb_LinkTarget_add_libs,$(1),$(2))
588 endef
590 define gb_LinkTarget__use_boost_locale
591 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
593 endef
595 define gb_LinkTarget__use_boost_date_time
596 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
598 endef
600 define gb_LinkTarget__use_boost_filesystem
601 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
603 endef
605 gb_ExternalProject__use_boost_filesystem :=
607 define gb_LinkTarget__use_boost_iostreams
608 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
610 endef
612 gb_ExternalProject__use_boost_iostreams :=
614 define gb_LinkTarget__use_boost_system
615 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
617 endef
619 gb_ExternalProject__use_boost_system :=
621 define gb_LinkTarget__use_boost_headers
622 $(call gb_LinkTarget_set_include,$(1),\
623 $$(INCLUDE) \
624 $(BOOST_CPPFLAGS) \
627 endef
629 gb_ExternalProject__use_boost_headers:=
631 else # !SYSTEM_BOOST
633 define gb_LinkTarget__use_boost_lib
634 $(call gb_LinkTarget_add_defs,$(1),\
635 -DBOOST_ALL_NO_LIB \
638 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
640 endef
642 define gb_LinkTarget__use_boost_locale
643 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
644 $(call gb_LinkTarget_add_libs,$(1),\
645 $(if $(filter $(OS),MACOSX),-liconv) \
648 endef
650 define gb_LinkTarget__use_boost_date_time
651 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
653 endef
655 define gb_LinkTarget__use_boost_filesystem
656 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
658 endef
660 define gb_ExternalProject__use_boost_filesystem
661 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
662 endef
664 define gb_LinkTarget__use_boost_iostreams
665 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
667 endef
669 define gb_ExternalProject__use_boost_iostreams
670 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
671 endef
673 define gb_LinkTarget__use_boost_system
674 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
676 endef
678 define gb_ExternalProject__use_boost_system
679 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
680 endef
682 define gb_LinkTarget__use_boost_headers
683 $(call gb_LinkTarget_use_unpacked,$(1),boost)
684 $(call gb_LinkTarget_set_include,$(1),\
685 $(BOOST_CPPFLAGS) \
686 $$(INCLUDE) \
689 endef
691 define gb_ExternalProject__use_boost_headers
692 $(call gb_ExternalProject_use_unpacked,$(1),boost)
694 endef
696 endif # SYSTEM_BOOST
699 ifneq ($(SYSTEM_LIBCMIS),)
701 define gb_LinkTarget__use_libcmis
702 $(call gb_LinkTarget_set_include,$(1),\
703 $$(INCLUDE) \
704 $(LIBCMIS_CFLAGS) \
706 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
708 endef
710 else # !SYSTEM_LIBCMIS
712 define gb_LinkTarget__use_libcmis
713 $(call gb_LinkTarget_set_include,$(1),\
714 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
715 $$(INCLUDE) \
717 $(call gb_LinkTarget_use_static_libraries,$(1),\
718 libcmis \
721 endef
723 endif # SYSTEM_LIBCMIS
725 ifeq ($(ENABLE_JAVA),TRUE)
727 define gb_LinkTarget__use_jawt
728 $(call gb_LinkTarget_add_libs,$(1),\
729 $(JAWTLIB) \
732 endef
734 else # !ENABLE_JAVA
736 gb_LinkTarget__use_jawt :=
738 endif # ENABLE_JAVA
740 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
742 define gb_LinkTarget__use_libatomic_ops
743 $(call gb_LinkTarget_set_include,$(1),\
744 $$(INCLUDE) \
745 $(LIBATOMIC_OPS_CFLAGS) \
747 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
749 endef
750 gb_ExternalProject__use_libatomic_ops :=
752 else # !SYSTEM_LIBATOMIC_OPS
754 define gb_LinkTarget__use_libatomic_ops
755 $(call gb_LinkTarget_set_include,$(1),\
756 $(LIBATOMIC_OPS_CFLAGS) \
757 $$(INCLUDE) \
758 $(LIBATOMIC_OPS_CFLAGS) \
760 $(call gb_LinkTarget_use_external_project,$(1),\
761 libatomic_ops \
764 $(call gb_LinkTarget_add_libs,$(1),\
765 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
768 endef
770 define gb_ExternalProject__use_libatomic_ops
771 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
773 endef
775 endif # SYSTEM_LIBATOMIC_OPS
778 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
780 define gb_LinkTarget__use_libexttextcat
781 $(call gb_LinkTarget_set_include,$(1),\
782 $$(INCLUDE) \
783 $(LIBEXTTEXTCAT_CFLAGS) \
785 $(call gb_LinkTarget_add_defs,$(1),\
786 -DSYSTEM_LIBEXTTEXTCAT \
788 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
790 endef
792 else # !SYSTEM_LIBEXTTEXTCAT
794 define gb_LinkTarget__use_libexttextcat
795 $(call gb_LinkTarget_set_include,$(1),\
796 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
797 $$(INCLUDE) \
800 ifeq ($(COM),MSC)
801 $(call gb_LinkTarget_use_static_libraries,$(1),\
802 libexttextcat \
804 else
805 $(call gb_LinkTarget_add_libs,$(1),\
806 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
808 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
809 endif
812 endef
814 endif # SYSTEM_LIBEXTTEXTCAT
817 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
819 define gb_LinkTarget__use_libnumbertext
820 $(call gb_LinkTarget_set_include,$(1),\
821 $$(INCLUDE) \
822 $(LIBNUMBERTEXT_CFLAGS) \
824 $(call gb_LinkTarget_add_defs,$(1),\
825 -DSYSTEM_LIBNUMBERTEXT \
827 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
829 endef
831 else # !SYSTEM_LIBNUMBERTEXT
833 ifneq ($(ENABLE_LIBNUMBERTEXT),)
835 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
836 libnumbertext_numbertext \
839 define gb_LinkTarget__use_libnumbertext
840 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
841 $(call gb_LinkTarget_set_include,$(1),\
842 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
843 $$(INCLUDE) \
845 $(call gb_LinkTarget_add_defs,$(1),\
846 -DENABLE_LIBNUMBERTEXT \
849 ifeq ($(COM),MSC)
850 $(call gb_LinkTarget_use_static_libraries,$(1),\
851 libnumbertext \
853 else
855 $(call gb_LinkTarget_add_libs,$(1),\
856 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
858 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
860 endif
862 endef
864 else # !ENABLE_LIBNUMBERTEXT
866 define gb_LinkTarget__use_libnumbertext
867 endef
869 endif # ENABLE_LIBNUMBERTEXT
871 endif # SYSTEM_LIBNUMBERTEXT
874 ifneq ($(SYSTEM_LIBXML),)
876 define gb_LinkTarget__use_libxml2
877 $(call gb_LinkTarget_add_defs,$(1),\
878 -DSYSTEM_LIBXML \
880 $(call gb_LinkTarget_set_include,$(1),\
881 $$(INCLUDE) \
882 $(LIBXML_CFLAGS) \
884 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
886 endef
887 gb_ExternalProject__use_libxml2:=
889 else # !SYSTEM_LIBXML
891 $(eval $(call gb_Helper_register_packages_for_install,ure,\
892 libxml2 \
895 define gb_LinkTarget__use_libxml2
896 $(call gb_LinkTarget_use_package,$(1),libxml2)
897 $(call gb_LinkTarget_set_include,$(1),\
898 $$(INCLUDE) \
899 $(LIBXML_CFLAGS) \
902 $(call gb_LinkTarget_add_libs,$(1),\
903 $(LIBXML_LIBS) \
906 ifeq ($(COM),MSC)
907 $(call gb_LinkTarget_use_external,$(1),icu_headers)
908 endif
910 endef
911 define gb_ExternalProject__use_libxml2
912 $(call gb_ExternalProject_use_package,$(1),libxml2)
914 ifeq ($(COM),MSC)
915 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
916 endif
918 endef
920 endif # SYSTEM_LIBXML
923 ifneq ($(SYSTEM_LIBXSLT),)
925 define gb_LinkTarget__use_libxslt
926 $(call gb_LinkTarget_set_include,$(1),\
927 $$(INCLUDE) \
928 $(LIBXSLT_CFLAGS) \
930 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
932 endef
934 define gb_LinkTarget__use_libexslt
935 $(call gb_LinkTarget_set_include,$(1),\
936 $$(INCLUDE) \
937 $(LIBEXSLT_CFLAGS) \
940 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
942 endef
944 else # !SYSTEM_LIBXSLT
946 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
947 libxslt \
950 define gb_LinkTarget__use_libxslt
951 $(call gb_LinkTarget_use_package,$(1),libxslt)
952 $(call gb_LinkTarget_set_include,$(1),\
953 $$(INCLUDE) \
954 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
957 ifeq ($(COM),MSC)
958 $(call gb_LinkTarget_add_libs,$(1),\
959 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
961 else
962 $(call gb_LinkTarget_add_libs,$(1),\
963 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
965 endif
967 endef
969 define gb_LinkTarget__use_libexslt
970 $(call gb_LinkTarget_use_package,$(1),libxslt)
971 $(call gb_LinkTarget_set_include,$(1),\
972 $$(INCLUDE) \
973 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
976 ifeq ($(COM),MSC)
977 $(call gb_LinkTarget_add_libs,$(1),\
978 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
980 else
981 $(call gb_LinkTarget_add_libs,$(1),\
982 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
984 endif
986 endef
988 endif # SYSTEM_LIBXSLT
991 ifneq ($(SYSTEM_XMLSEC),)
993 define gb_LinkTarget__use_xmlsec
994 $(call gb_LinkTarget_add_defs,$(1),\
995 -DSYSTEM_XMLSEC \
997 $(call gb_LinkTarget_set_include,$(1),\
998 $$(INCLUDE) \
999 $(XMLSEC_CFLAGS) \
1001 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
1003 endef
1005 gb_ExternalProject__use_xmlsec:=
1007 else # !SYSTEM_XMLSEC
1009 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1010 xmlsec \
1013 define gb_LinkTarget__use_xmlsec
1015 endef
1017 endif # SYSTEM_XMLSEC
1019 ifneq ($(SYSTEM_LIBLANGTAG),)
1021 define gb_LinkTarget__use_liblangtag
1022 $(call gb_LinkTarget_set_include,$(1),\
1023 $$(INCLUDE) \
1024 $(LIBLANGTAG_CFLAGS) \
1027 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1029 endef
1031 gb_ExternalProject__use_liblangtag :=
1033 else # !SYSTEM_LIBLANGTAG
1035 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1036 liblangtag_data \
1039 ifeq ($(COM),MSC)
1041 define gb_LinkTarget__use_liblangtag
1042 $(call gb_LinkTarget_set_include,$(1),\
1043 $(LIBLANGTAG_CFLAGS) \
1044 $$(INCLUDE) \
1046 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1047 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1049 endef
1051 else
1053 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1054 liblangtag \
1057 define gb_LinkTarget__use_liblangtag
1058 $(call gb_LinkTarget_set_include,$(1),\
1059 $(LIBLANGTAG_CFLAGS) \
1060 $$(INCLUDE) \
1062 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1063 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1065 endef
1067 endif # MSC
1069 define gb_ExternalProject__use_liblangtag
1070 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1072 endef
1074 endif # SYSTEM_LIBLANGTAG
1077 gb_ExternalProject__use_apr :=
1079 ifeq ($(WITH_WEBDAV),serf)
1081 define gb_LinkTarget__use_apr
1082 $(call gb_LinkTarget_set_include,$(1),\
1083 $$(INCLUDE) \
1084 $(APR_CFLAGS) \
1086 $(call gb_LinkTarget_add_libs,$(1),\
1087 $(APR_LIBS) \
1088 $(if $(filter $(OS),LINUX),-lpthread) \
1089 $(if $(filter $(OS),MACOSX),-liconv) \
1092 ifeq ($(SYSTEM_APR),)
1093 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1094 mswsock \
1095 rpcrt4 \
1096 shell32 \
1098 $(call gb_LinkTarget_add_defs,$(1),\
1099 -DAPR_DECLARE_STATIC \
1100 -DAPU_DECLARE_STATIC \
1102 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1103 endif
1105 endef
1107 define gb_ExternalProject__use_apr
1108 ifeq ($(SYSTEM_APR),)
1109 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1110 endif
1112 endef
1114 define gb_LinkTarget__use_serf
1115 $(call gb_LinkTarget_set_include,$(1),\
1116 $(SERF_CFLAGS) \
1117 $$(INCLUDE) \
1119 $(call gb_LinkTarget_add_libs,$(1),\
1120 $(SERF_LIBS) \
1123 ifeq ($(SYSTEM_SERF),)
1124 $(call gb_LinkTarget_use_external_project,$(1),serf)
1125 endif
1127 endef
1129 else ifeq ($(WITH_WEBDAV),neon)
1131 ifneq ($(SYSTEM_NEON),)
1133 define gb_LinkTarget__use_neon
1134 $(call gb_LinkTarget_add_defs,$(1),\
1135 -DNEON_VERSION=0x$(NEON_VERSION) \
1136 -DSYSTEM_NEON \
1138 $(call gb_LinkTarget_set_include,$(1),\
1139 $$(INCLUDE) \
1140 $(NEON_CFLAGS) \
1143 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1145 endef
1147 else # !SYSTEM_NEON
1149 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1150 neon \
1153 define gb_LinkTarget__use_neon
1154 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1155 $(call gb_LinkTarget_set_include,$(1),\
1156 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1157 $$(INCLUDE) \
1159 $(call gb_LinkTarget_use_libraries,$(1),\
1160 neon \
1163 endef
1165 endif # SYSTEM_NEON
1167 endif # WITH_WEBDAV
1169 ifneq ($(SYSTEM_REDLAND),)
1171 define gb_LinkTarget__use_librdf
1172 $(call gb_LinkTarget_add_defs,$(1),\
1173 -DSYSTEM_REDLAND \
1175 $(call gb_LinkTarget_set_include,$(1),\
1176 $$(INCLUDE) \
1177 $(REDLAND_CFLAGS) \
1179 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1181 endef
1183 gb_LinkTarget__use_redland_headers:=
1185 gb_LinkTarget__use_raptor_headers:=
1187 gb_LinkTarget__use_rasqal_headers:=
1189 else # !SYSTEM_REDLAND
1191 define gb_LinkTarget__use_redland_headers
1192 $(call gb_LinkTarget_set_include,$(1),\
1193 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1194 $$(INCLUDE) \
1197 endef
1199 define gb_LinkTarget__use_raptor_headers
1200 $(call gb_LinkTarget_set_include,$(1),\
1201 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1202 $$(INCLUDE) \
1205 endef
1207 define gb_LinkTarget__use_rasqal_headers
1208 $(call gb_LinkTarget_set_include,$(1),\
1209 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1210 $$(INCLUDE) \
1213 endef
1215 ifneq ($(OS),ANDROID)
1217 ifeq ($(COM),MSC)
1218 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1219 raptor2 \
1220 rasqal \
1221 rdf \
1223 else
1224 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1225 raptor \
1226 rasqal \
1227 redland \
1229 endif
1231 define gb_LinkTarget__use_librdf
1232 ifeq ($(COM),MSC)
1233 $(call gb_LinkTarget_use_libraries,$(1),\
1234 raptor2 \
1235 rdf \
1237 else
1238 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1240 $(call gb_LinkTarget_add_libs,$(1),\
1241 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1242 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1243 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1245 endif
1247 endef
1249 else # ANDROID
1251 define gb_LinkTarget__use_librdf
1252 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1254 endef
1256 endif # ANDROID
1258 endif # SYSTEM_REDLAND
1261 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(DISABLE_GUI),) # or
1263 ifneq ($(SYSTEM_CAIRO),)
1265 define gb_LinkTarget__use_cairo
1266 $(call gb_LinkTarget_set_include,$(1),\
1267 $$(INCLUDE) \
1268 $(CAIRO_CFLAGS) \
1270 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1271 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1273 endef
1275 else # !SYSTEM_CAIRO
1277 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1278 cairo \
1279 $(if $(filter $(OS),WNT),,pixman) \
1282 define gb_LinkTarget__use_cairo
1283 $(call gb_LinkTarget_use_package,$(1),cairo)
1284 $(call gb_LinkTarget_use_package,$(1),pixman)
1285 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1286 $(call gb_LinkTarget_set_include,$(1),\
1287 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1288 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1289 $$(INCLUDE) \
1291 $(call gb_LinkTarget_add_libs,$(1),\
1292 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1293 $(if $(filter-out MACOSX WNT,$(OS)), \
1294 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1298 endef
1300 endif # SYSTEM_CAIRO
1302 else ifeq ($(OS),ANDROID)
1304 define gb_LinkTarget__use_cairo
1305 $(call gb_LinkTarget_use_package,$(1),cairo)
1306 $(call gb_LinkTarget_use_package,$(1),pixman)
1307 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1308 $(call gb_LinkTarget_set_include,$(1),\
1309 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1310 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1311 $$(INCLUDE) \
1313 $(call gb_LinkTarget_add_libs,$(1),\
1314 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1315 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1318 endef
1320 endif # CAIRO
1322 ifneq ($(SYSTEM_FREETYPE),)
1324 define gb_LinkTarget__use_freetype_headers
1325 $(call gb_LinkTarget_set_include,$(1),\
1326 $$(INCLUDE) \
1327 $(FREETYPE_CFLAGS) \
1330 endef
1332 gb_ExternalProject__use_freetype :=
1334 else
1336 define gb_LinkTarget__use_freetype_headers
1337 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1338 $(call gb_LinkTarget_set_include,$(1),\
1339 $(FREETYPE_CFLAGS) \
1340 $$(INCLUDE) \
1343 endef
1345 define gb_ExternalProject__use_freetype
1346 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1348 endef
1350 endif # SYSTEM_FREETYPE
1352 define gb_LinkTarget__use_freetype
1353 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1354 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1356 endef
1358 ifneq ($(SYSTEM_FONTCONFIG),)
1360 define gb_LinkTarget__use_fontconfig
1361 $(call gb_LinkTarget_set_include,$(1),\
1362 $$(INCLUDE) \
1363 $(FONTCONFIG_CFLAGS) \
1366 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1368 endef
1370 else
1372 define gb_LinkTarget__use_fontconfig
1373 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1374 $(call gb_LinkTarget_set_include,$(1),\
1375 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1376 $$(INCLUDE) \
1379 $(call gb_LinkTarget_add_libs,$(1),\
1380 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1383 endef
1385 endif # SYSTEM_FONTCONFIG
1387 ifneq ($(SYSTEM_GRAPHITE),)
1389 define gb_LinkTarget__use_graphite
1390 $(call gb_LinkTarget_set_include,$(1),\
1391 $$(INCLUDE) \
1392 $(GRAPHITE_CFLAGS) \
1394 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1396 endef
1398 gb_ExternalProject__use_graphite:=
1400 else # !SYSTEM_GRAPHITE
1402 define gb_LinkTarget__use_graphite
1403 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1404 $(call gb_LinkTarget_set_include,$(1),\
1405 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1406 $$(INCLUDE) \
1408 $(call gb_LinkTarget_use_static_libraries,$(1),\
1409 graphite \
1412 endef
1414 define gb_ExternalProject__use_graphite
1415 $(call gb_ExternalProject_use_static_libraries,$(1),\
1416 graphite \
1419 endef
1420 endif # SYSTEM_GRAPHITE
1422 ifneq ($(SYSTEM_ICU),)
1424 gb_LinkTarget__use_icu_headers:=
1425 gb_ExternalProject__use_icu:=
1427 define gb_LinkTarget__use_icudata
1428 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1430 endef
1431 define gb_LinkTarget__use_icui18n
1432 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1434 endef
1435 define gb_LinkTarget__use_icuuc
1436 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1438 endef
1440 else # !SYSTEM_ICU
1442 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1443 icu_ure \
1446 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1447 icu \
1450 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1451 gb_ICU_suffix:=lo
1452 else
1453 gb_ICU_suffix:=
1454 endif
1456 define gb_LinkTarget__use_icu_headers
1457 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1458 $(call gb_LinkTarget_set_include,$(1),\
1459 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1460 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1461 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1462 $$(INCLUDE) \
1465 endef
1467 define gb_ExternalProject__use_icu
1468 $(call gb_ExternalProject_use_package,$(1),icu)
1470 endef
1472 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1473 define gb_LinkTarget__use_icudata
1474 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1476 ifeq ($(OS),WNT)
1477 $(call gb_LinkTarget_add_libs,$(1),\
1478 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1480 else
1481 $(call gb_LinkTarget_add_libs,$(1),\
1482 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1484 endif
1486 endef
1488 define gb_LinkTarget__use_icui18n
1489 $(call gb_LinkTarget_use_package,$(1),icu)
1491 ifeq ($(OS),WNT)
1492 $(call gb_LinkTarget_add_libs,$(1),\
1493 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1495 else
1496 $(call gb_LinkTarget_add_libs,$(1),\
1497 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1499 endif
1501 endef
1503 define gb_LinkTarget__use_icuuc
1504 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1506 ifeq ($(OS),WNT)
1507 $(call gb_LinkTarget_add_libs,$(1),\
1508 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1510 else
1511 $(call gb_LinkTarget_add_libs,$(1),\
1512 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1514 endif
1516 endef
1518 endif # SYSTEM_ICU
1520 ifneq ($(SYSTEM_HARFBUZZ),)
1522 define gb_LinkTarget__use_harfbuzz
1523 $(call gb_LinkTarget_set_include,$(1),\
1524 $$(INCLUDE) \
1525 $(HARFBUZZ_CFLAGS) \
1527 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1529 endef
1531 gb_ExternalProject__use_harfbuzz :=
1533 else # SYSTEM_HARFBUZZ != TRUE
1535 define gb_LinkTarget__use_harfbuzz
1536 $(call gb_LinkTarget_set_include,$(1),\
1537 $(HARFBUZZ_CFLAGS) \
1538 $$(INCLUDE) \
1540 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1541 $(call gb_LinkTarget_use_external,$(1),icuuc)
1542 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1544 endef
1546 define gb_ExternalProject__use_harfbuzz
1547 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1549 endef
1551 endif # SYSTEM_HARFBUZZ
1553 ifeq ($(DISABLE_OPENSSL),TRUE)
1555 gb_ExternalProject__use_openssl:=
1556 gb_LinkTarget__use_openssl_headers:=
1557 gb_LinkTarget__use_openssl:=
1559 else # !DISABLE_OPENSSL
1561 ifneq ($(SYSTEM_OPENSSL),)
1563 gb_LinkTarget__use_openssl_headers:=
1564 gb_ExternalProject__use_openssl:=
1566 define gb_LinkTarget__use_openssl
1567 $(call gb_LinkTarget_set_include,$(1),\
1568 $$(INCLUDE) \
1569 $(OPENSSL_CFLAGS) \
1571 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1573 endef
1575 else # !SYSTEM_OPENSSL
1577 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1578 openssl \
1581 define gb_ExternalProject__use_openssl
1582 $(call gb_ExternalProject_use_package,$(1),openssl)
1584 endef
1586 define gb_LinkTarget__use_openssl_headers
1587 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1588 $(call gb_LinkTarget_set_include,$(1),\
1589 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1590 $$(INCLUDE) \
1593 endef
1595 define gb_LinkTarget__use_openssl
1596 $(call gb_LinkTarget_use_package,$(1),openssl)
1597 ifeq ($(OS),WNT)
1598 $(call gb_LinkTarget_add_libs,$(1),\
1599 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1600 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1602 else
1603 $(call gb_LinkTarget_add_libs,$(1),\
1604 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1605 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1607 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1608 ifeq ($(OS),SOLARIS)
1609 $(call gb_LinkTarget_add_libs,$(1),\
1610 -lnsl \
1611 -lsocket \
1613 endif
1614 endif
1616 endef
1618 endif # SYSTEM_OPENSSL
1619 endif # DISABLE_OPENSSL
1622 ifeq ($(DISABLE_OPENSSL),TRUE)
1624 define gb_LinkTarget__use_gnutls
1625 $(call gb_LinkTarget_set_include,$(1),\
1626 $$(INCLUDE) \
1627 $(GNUTLS_CFLAGS) \
1630 $(call gb_LinkTarget_add_defs,$(1),\
1631 -DDISABLE_OPENSSL \
1634 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1636 endef
1638 define gb_LinkTarget__use_libgcrypt
1639 $(call gb_LinkTarget_set_include,$(1),\
1640 $$(INCLUDE) \
1641 $(LIBGCRYPT_CFLAGS) \
1644 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1646 endef
1648 else # !DISABLE_OPENSSL
1650 gb_LinkTarget__use_gnutls:=
1651 gb_LinkTarget__use_libgcrypt:=
1653 endif # DISABLE_OPENSSL
1656 ifneq ($(SYSTEM_CDR),)
1658 define gb_LinkTarget__use_cdr
1659 $(call gb_LinkTarget_set_include,$(1),\
1660 $$(INCLUDE) \
1661 $(CDR_CFLAGS) \
1663 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1665 endef
1667 else # !SYSTEM_CDR
1669 define gb_LinkTarget__use_cdr
1670 $(call gb_LinkTarget_set_include,$(1),\
1671 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1672 $$(INCLUDE) \
1674 $(call gb_LinkTarget_add_libs,$(1),\
1675 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1677 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1678 endef
1680 endif # SYSTEM_CDR
1683 ifneq ($(SYSTEM_EBOOK),)
1685 define gb_LinkTarget__use_ebook
1686 $(call gb_LinkTarget_set_include,$(1),\
1687 $$(INCLUDE) \
1688 $(EBOOK_CFLAGS) \
1690 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1692 endef
1694 gb_ExternalProject__use_ebook :=
1696 else # !SYSTEM_EBOOK
1698 define gb_LinkTarget__use_ebook
1699 $(call gb_LinkTarget_set_include,$(1),\
1700 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1701 $$(INCLUDE) \
1703 $(call gb_LinkTarget_add_libs,$(1),\
1704 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1706 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1708 endef
1710 define gb_ExternalProject__use_ebook
1711 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1713 endef
1715 endif # SYSTEM_EBOOK
1718 ifneq ($(SYSTEM_ETONYEK),)
1720 define gb_LinkTarget__use_etonyek
1721 $(call gb_LinkTarget_set_include,$(1),\
1722 $$(INCLUDE) \
1723 $(ETONYEK_CFLAGS) \
1725 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1727 endef
1729 gb_ExternalProject__use_etonyek :=
1731 else # !SYSTEM_ETONYEK
1733 ifeq ($(COM),MSC)
1735 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1736 etonyek \
1739 define gb_LinkTarget__use_etonyek
1740 $(call gb_LinkTarget_set_include,$(1),\
1741 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1742 $$(INCLUDE) \
1744 $(call gb_LinkTarget_use_libraries,$(1),\
1745 etonyek \
1748 endef
1750 else # !MSC
1752 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1753 libetonyek \
1756 define gb_LinkTarget__use_etonyek
1757 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1759 $(call gb_LinkTarget_set_include,$(1),\
1760 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1761 -DLIBETONYEK_VISIBILITY \
1762 $$(INCLUDE) \
1764 $(call gb_LinkTarget_add_libs,$(1),\
1765 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1767 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1769 endef
1771 define gb_ExternalProject__use_etonyek
1772 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1774 endef
1776 endif
1778 endif # SYSTEM_ETONYEK
1781 ifneq ($(SYSTEM_FREEHAND),)
1783 define gb_LinkTarget__use_freehand
1784 $(call gb_LinkTarget_set_include,$(1),\
1785 $$(INCLUDE) \
1786 $(FREEHAND_CFLAGS) \
1788 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1790 endef
1792 gb_ExternalProject__use_freehand :=
1794 else # !SYSTEM_FREEHAND
1796 define gb_LinkTarget__use_freehand
1797 $(call gb_LinkTarget_set_include,$(1),\
1798 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1799 $$(INCLUDE) \
1801 $(call gb_LinkTarget_add_libs,$(1),\
1802 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1804 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1806 endef
1808 define gb_ExternalProject__use_freehand
1809 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1811 endef
1813 endif # SYSTEM_FREEHAND
1816 ifneq ($(SYSTEM_ODFGEN),)
1818 define gb_LinkTarget__use_odfgen
1819 $(call gb_LinkTarget_set_include,$(1),\
1820 $$(INCLUDE) \
1821 $(ODFGEN_CFLAGS) \
1823 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1825 endef
1827 else # !SYSTEM_ODFGEN
1829 ifeq ($(COM),MSC)
1831 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1832 odfgen \
1835 define gb_LinkTarget__use_odfgen
1836 $(call gb_LinkTarget_set_include,$(1),\
1837 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1838 $$(INCLUDE) \
1840 $(call gb_LinkTarget_use_libraries,$(1),\
1841 odfgen \
1844 endef
1846 else # !MSC
1848 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1849 libodfgen \
1852 define gb_LinkTarget__use_odfgen
1853 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1855 $(call gb_LinkTarget_set_include,$(1),\
1856 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1857 -DLIBODFGEN_VISIBILITY \
1858 $$(INCLUDE) \
1860 $(call gb_LinkTarget_add_libs,$(1),\
1861 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1864 endef
1866 endif
1868 endif # SYSTEM_ODFGEN
1870 ifneq ($(SYSTEM_EPUBGEN),)
1872 define gb_LinkTarget__use_epubgen
1873 $(call gb_LinkTarget_set_include,$(1),\
1874 $$(INCLUDE) \
1875 $(EPUBGEN_CFLAGS) \
1877 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1879 endef
1880 gb_ExternalProject__use_epubgen :=
1882 else # !SYSTEM_EPUBGEN
1884 define gb_LinkTarget__use_epubgen
1885 $(call gb_LinkTarget_set_include,$(1),\
1886 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1887 $$(INCLUDE) \
1889 $(call gb_LinkTarget_add_libs,$(1),\
1890 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1892 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1894 endef
1895 define gb_ExternalProject__use_epubgen
1896 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1898 endef
1900 endif # SYSTEM_EPUBGEN
1902 ifneq ($(SYSTEM_REVENGE),)
1904 define gb_LinkTarget__use_revenge
1905 $(call gb_LinkTarget_set_include,$(1),\
1906 $$(INCLUDE) \
1907 $(REVENGE_CFLAGS) \
1909 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1911 endef
1913 gb_ExternalProject__use_revenge :=
1915 else # !SYSTEM_REVENGE
1917 ifeq ($(COM),MSC)
1919 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1920 revenge \
1923 define gb_LinkTarget__use_revenge
1924 $(call gb_LinkTarget_set_include,$(1),\
1925 $(REVENGE_CFLAGS) \
1926 $$(INCLUDE) \
1928 $(call gb_LinkTarget_use_libraries,$(1),\
1929 revenge \
1932 endef
1934 define gb_ExternalProject__use_revenge
1935 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1937 endef
1939 else # !MSC
1941 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1942 librevenge \
1945 define gb_LinkTarget__use_revenge
1946 $(call gb_LinkTarget_use_package,$(1),librevenge)
1948 $(call gb_LinkTarget_set_include,$(1),\
1949 $(REVENGE_CFLAGS) \
1950 -DLIBREVENGE_VISIBILITY \
1951 $$(INCLUDE) \
1953 $(call gb_LinkTarget_add_libs,$(1),\
1954 $(REVENGE_LIBS) \
1956 endef
1958 define gb_ExternalProject__use_revenge
1959 $(call gb_ExternalProject_use_package,$(1),librevenge)
1961 endef
1963 endif # MSC
1965 endif # SYSTEM_REVENGE
1968 ifneq ($(SYSTEM_ABW),)
1970 define gb_LinkTarget__use_abw
1971 $(call gb_LinkTarget_set_include,$(1),\
1972 $$(INCLUDE) \
1973 $(ABW_CFLAGS) \
1975 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1977 endef
1978 gb_ExternalProject__use_abw :=
1980 else # !SYSTEM_ABW
1982 define gb_LinkTarget__use_abw
1983 $(call gb_LinkTarget_set_include,$(1),\
1984 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1985 $$(INCLUDE) \
1987 $(call gb_LinkTarget_add_libs,$(1),\
1988 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1990 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1992 endef
1993 define gb_ExternalProject__use_abw
1994 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1996 endef
1998 endif # SYSTEM_ABW
2001 ifneq ($(SYSTEM_MSPUB),)
2003 define gb_LinkTarget__use_mspub
2004 $(call gb_LinkTarget_set_include,$(1),\
2005 $$(INCLUDE) \
2006 $(MSPUB_CFLAGS) \
2008 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2010 endef
2012 else # !SYSTEM_MSPUB
2014 define gb_LinkTarget__use_mspub
2015 $(call gb_LinkTarget_set_include,$(1),\
2016 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2017 $$(INCLUDE) \
2019 $(call gb_LinkTarget_add_libs,$(1),\
2020 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2022 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2024 endef
2026 endif # SYSTEM_MSPUB
2029 ifneq ($(SYSTEM_PAGEMAKER),)
2031 define gb_LinkTarget__use_pagemaker
2032 $(call gb_LinkTarget_set_include,$(1),\
2033 $$(INCLUDE) \
2034 $(PAGEMAKER_CFLAGS) \
2036 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2038 endef
2039 gb_ExternalProject__use_pagemaker :=
2041 else # !SYSTEM_PAGEMAKER
2043 define gb_LinkTarget__use_pagemaker
2044 $(call gb_LinkTarget_set_include,$(1),\
2045 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2046 $$(INCLUDE) \
2048 $(call gb_LinkTarget_add_libs,$(1),\
2049 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2051 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2053 endef
2054 define gb_ExternalProject__use_pagemaker
2055 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2057 endef
2059 endif # SYSTEM_PAGEMAKER
2062 ifneq ($(SYSTEM_QXP),)
2064 define gb_LinkTarget__use_qxp
2065 $(call gb_LinkTarget_set_include,$(1),\
2066 $$(INCLUDE) \
2067 $(QXP_CFLAGS) \
2069 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2071 endef
2072 gb_ExternalProject__use_qxp :=
2074 else # !SYSTEM_QXP
2076 define gb_LinkTarget__use_qxp
2077 $(call gb_LinkTarget_set_include,$(1),\
2078 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2079 $$(INCLUDE) \
2081 $(call gb_LinkTarget_add_libs,$(1),\
2082 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2084 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2086 endef
2087 define gb_ExternalProject__use_qxp
2088 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2090 endef
2092 endif # SYSTEM_QXP
2095 ifneq ($(SYSTEM_ZMF),)
2097 define gb_LinkTarget__use_zmf
2098 $(call gb_LinkTarget_set_include,$(1),\
2099 $$(INCLUDE) \
2100 $(ZMF_CFLAGS) \
2102 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2104 endef
2105 gb_ExternalProject__use_zmf :=
2107 else # !SYSTEM_ZMF
2109 define gb_LinkTarget__use_zmf
2110 $(call gb_LinkTarget_set_include,$(1),\
2111 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2112 $$(INCLUDE) \
2114 $(call gb_LinkTarget_add_libs,$(1),\
2115 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2117 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2119 endef
2120 define gb_ExternalProject__use_zmf
2121 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2123 endef
2125 endif # SYSTEM_ZMF
2128 ifneq ($(SYSTEM_VISIO),)
2130 define gb_LinkTarget__use_visio
2131 $(call gb_LinkTarget_set_include,$(1),\
2132 $$(INCLUDE) \
2133 $(VISIO_CFLAGS) \
2135 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2137 endef
2139 else # !SYSTEM_VISIO
2141 define gb_LinkTarget__use_visio
2142 $(call gb_LinkTarget_set_include,$(1),\
2143 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2144 $$(INCLUDE) \
2146 $(call gb_LinkTarget_add_libs,$(1),\
2147 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2149 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2151 endef
2153 endif # SYSTEM_VISIO
2156 ifneq ($(SYSTEM_WPD),)
2158 define gb_LinkTarget__use_wpd
2159 $(call gb_LinkTarget_set_include,$(1),\
2160 $$(INCLUDE) \
2161 $(WPD_CFLAGS) \
2163 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2165 endef
2166 gb_ExternalProject__use_wpd :=
2168 else # !SYSTEM_WPD
2170 ifeq ($(COM),MSC)
2172 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2173 wpd \
2176 define gb_LinkTarget__use_wpd
2177 $(call gb_LinkTarget_set_include,$(1),\
2178 $(WPD_CFLAGS) \
2179 $$(INCLUDE) \
2181 $(call gb_LinkTarget_use_libraries,$(1),\
2182 wpd \
2185 endef
2187 define gb_ExternalProject__use_wpd
2188 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2190 endef
2192 else # !MSC
2194 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2195 libwpd \
2198 define gb_LinkTarget__use_wpd
2199 $(call gb_LinkTarget_use_package,$(1),libwpd)
2201 $(call gb_LinkTarget_set_include,$(1),\
2202 $(WPD_CFLAGS) \
2203 $$(INCLUDE) \
2205 $(call gb_LinkTarget_add_libs,$(1),\
2206 $(WPD_LIBS) \
2209 endef
2211 define gb_ExternalProject__use_wpd
2212 $(call gb_ExternalProject_use_package,$(1),libwpd)
2214 endef
2216 endif # MSC
2218 endif # SYSTEM_WPD
2221 ifneq ($(SYSTEM_WPG),)
2223 define gb_LinkTarget__use_wpg
2224 $(call gb_LinkTarget_set_include,$(1),\
2225 $$(INCLUDE) \
2226 $(WPG_CFLAGS) \
2228 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2230 endef
2231 gb_ExternalProject__use_wpg :=
2233 else # !SYSTEM_WPG
2235 ifeq ($(COM),MSC)
2237 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2238 wpg \
2241 define gb_LinkTarget__use_wpg
2242 $(call gb_LinkTarget_set_include,$(1),\
2243 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2244 $$(INCLUDE) \
2246 $(call gb_LinkTarget_use_libraries,$(1),\
2247 wpg \
2250 endef
2252 else # !MSC
2254 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2255 libwpg \
2258 define gb_LinkTarget__use_wpg
2259 $(call gb_LinkTarget_use_package,$(1),libwpg)
2261 $(call gb_LinkTarget_set_include,$(1),\
2262 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2263 $$(INCLUDE) \
2265 $(call gb_LinkTarget_add_libs,$(1),\
2266 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2269 endef
2271 endif # MSC
2273 endif # SYSTEM_WPG
2276 ifneq ($(SYSTEM_WPS),)
2278 define gb_LinkTarget__use_wps
2279 $(call gb_LinkTarget_set_include,$(1),\
2280 $$(INCLUDE) \
2281 $(WPS_CFLAGS) \
2283 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2285 endef
2286 gb_ExternalProject__use_wps :=
2288 else # !SYSTEM_WPS
2290 ifeq ($(COM),MSC)
2292 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2293 wps \
2296 define gb_LinkTarget__use_wps
2297 $(call gb_LinkTarget_set_include,$(1),\
2298 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2299 $$(INCLUDE) \
2302 $(call gb_LinkTarget_use_libraries,$(1),\
2303 wps \
2306 endef
2308 else # !MSC
2310 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2311 libwps \
2314 define gb_LinkTarget__use_wps
2315 $(call gb_LinkTarget_use_package,$(1),libwps)
2317 $(call gb_LinkTarget_set_include,$(1),\
2318 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2319 $$(INCLUDE) \
2321 $(call gb_LinkTarget_add_libs,$(1),\
2322 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2325 endef
2327 endif # MSC
2329 endif # SYSTEM_WPS
2332 ifneq ($(SYSTEM_MWAW),)
2334 define gb_LinkTarget__use_mwaw
2335 $(call gb_LinkTarget_set_include,$(1),\
2336 $$(INCLUDE) \
2337 $(MWAW_CFLAGS) \
2339 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2341 endef
2343 else # !SYSTEM_MWAW
2345 ifeq ($(COM),MSC)
2347 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2348 mwaw \
2351 define gb_LinkTarget__use_mwaw
2352 $(call gb_LinkTarget_set_include,$(1),\
2353 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2354 $$(INCLUDE) \
2357 $(call gb_LinkTarget_use_libraries,$(1),\
2358 mwaw \
2361 endef
2363 else # !MSC
2365 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2366 libmwaw \
2369 define gb_LinkTarget__use_mwaw
2370 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2372 $(call gb_LinkTarget_set_include,$(1),\
2373 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2374 $$(INCLUDE) \
2376 $(call gb_LinkTarget_add_libs,$(1),\
2377 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2380 endef
2382 endif # MSC
2384 endif # SYSTEM_MWAW
2386 ifneq ($(SYSTEM_STAROFFICE),)
2388 define gb_LinkTarget__use_staroffice
2389 $(call gb_LinkTarget_set_include,$(1),\
2390 $$(INCLUDE) \
2391 $(STAROFFICE_CFLAGS) \
2393 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2395 endef
2397 else # !SYSTEM_STAROFFICE
2399 ifeq ($(COM),MSC)
2401 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2402 staroffice \
2405 define gb_LinkTarget__use_staroffice
2406 $(call gb_LinkTarget_set_include,$(1),\
2407 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2408 $$(INCLUDE) \
2411 $(call gb_LinkTarget_use_libraries,$(1),\
2412 staroffice \
2415 endef
2417 else # !MSC
2419 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2420 libstaroffice \
2423 define gb_LinkTarget__use_staroffice
2424 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2426 $(call gb_LinkTarget_set_include,$(1),\
2427 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2428 $$(INCLUDE) \
2430 $(call gb_LinkTarget_add_libs,$(1),\
2431 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2434 endef
2436 endif # MSC
2438 endif # SYSTEM_STAROFFICE
2441 ifneq ($(SYSTEM_LCMS2),)
2443 define gb_LinkTarget__use_lcms2
2444 $(call gb_LinkTarget_set_include,$(1),\
2445 $$(INCLUDE) \
2446 $(LCMS2_CFLAGS) \
2448 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2450 endef
2452 gb_ExternalProject__use_lcms2 :=
2454 else # !SYSTEM_LCMS2
2456 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2457 lcms2 \
2460 define gb_ExternalProject__use_lcms2
2461 $(call gb_ExternalProject_use_package,$(1),lcms2)
2463 endef
2465 ifeq ($(OS),ANDROID)
2467 define gb_LinkTarget__use_lcms2
2468 $(call gb_LinkTarget_use_package,$(1),lcms2)
2469 $(call gb_LinkTarget_set_include,$(1),\
2470 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2471 $$(INCLUDE) \
2474 endef
2476 else
2478 define gb_LinkTarget__use_lcms2
2479 $(call gb_LinkTarget_use_package,$(1),lcms2)
2480 $(call gb_LinkTarget_set_include,$(1),\
2481 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2482 $$(INCLUDE) \
2484 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2486 endef
2488 endif # ANDROID
2489 endif # SYSTEM_LCMS2
2491 ifneq ($(ENABLE_LPSOLVE),)
2493 ifneq ($(SYSTEM_LPSOLVE),)
2495 define gb_LinkTarget__use_lpsolve
2496 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2497 $(call gb_LinkTarget_add_defs,$(1),\
2498 -DSYSTEM_LPSOLVE \
2501 endef
2503 else # !SYSTEM_LPSOLVE
2505 define gb_LinkTarget__use_lpsolve
2506 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2507 ifeq ($(COM),MSC)
2508 $(call gb_LinkTarget_add_libs,$(1),\
2509 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2511 else
2512 $(call gb_LinkTarget_add_libs,$(1),\
2513 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2515 endif
2516 $(call gb_LinkTarget_set_include,$(1),\
2517 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2518 $$(INCLUDE) \
2521 endef
2523 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2524 lpsolve \
2527 endif # SYSTEM_LPSOLVE
2529 else
2531 gb_LinkTarget__use_lpsolve :=
2533 endif # ENABLE_LPSOLVE
2535 ifneq ($(ENABLE_COINMP),)
2537 ifneq ($(SYSTEM_COINMP),TRUE)
2539 define gb_LinkTarget__use_coinmp
2540 $(call gb_LinkTarget_use_package,$(1),coinmp)
2541 ifeq ($(COM),MSC)
2542 $(call gb_LinkTarget_add_libs,$(1),\
2543 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2545 else
2546 $(call gb_LinkTarget_add_libs,$(1),\
2547 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2548 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2549 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2550 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2551 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2552 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2553 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2555 endif
2556 $(call gb_LinkTarget_set_include,$(1),\
2557 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2558 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2559 $$(INCLUDE) \
2562 endef
2564 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2565 coinmp \
2568 else # SYSTEM_COINMP
2570 define gb_LinkTarget__use_coinmp
2571 $(call gb_LinkTarget_set_include,$(1),\
2572 $$(INCLUDE) \
2573 $(COINMP_CFLAGS) \
2575 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2577 endef
2579 endif
2581 else
2583 gb_LinkTarget__use_coinmp :=
2585 endif # ENABLE_COINMP
2587 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2589 define gb_LinkTarget__use_mDNSResponder
2590 $(call gb_LinkTarget_set_include,$(1),\
2591 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2592 $$(INCLUDE) \
2594 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2595 endef
2597 endif # MDNSRESPONDER
2599 ifeq ($(ENABLE_GIO),TRUE)
2601 define gb_LinkTarget__use_gio
2602 $(call gb_LinkTarget_set_include,$(1),\
2603 $$(INCLUDE) \
2604 $(GIO_CFLAGS) \
2607 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2609 endef
2611 else # ENABLE_GIO
2613 define gb_LinkTarget__use_gio
2615 endef
2617 endif # ENABLE_GIO
2619 ifeq ($(ENABLE_AVAHI),TRUE)
2621 define gb_LinkTarget__use_avahi
2622 $(call gb_LinkTarget_set_include,$(1),\
2623 $$(INCLUDE) \
2624 $(AVAHI_CFLAGS) \
2627 $(call gb_LinkTarget_add_defs,$(1),\
2628 -DENABLE_AVAHI \
2631 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2633 endef
2635 else # ENABLE_AVAHI
2637 gb_LinkTarget__use_avahi :=
2639 endif # ENABLE_AVAHI
2641 ifeq ($(ENABLE_CUPS),TRUE)
2643 define gb_LinkTarget__use_cups
2644 $(call gb_LinkTarget_add_defs,$(1),\
2645 -DENABLE_CUPS \
2648 $(call gb_LinkTarget_add_libs,$(1),\
2649 -lcups \
2652 endef
2654 else # ENABLE_CUPS
2656 define gb_LinkTarget__use_cups
2658 endef
2660 endif # ENABLE_CUPS
2662 ifeq ($(ENABLE_DBUS),TRUE)
2664 define gb_LinkTarget__use_dbus
2665 $(call gb_LinkTarget_set_include,$(1),\
2666 $$(INCLUDE) \
2667 $(DBUS_CFLAGS) \
2670 $(call gb_LinkTarget_add_libs,$(1),\
2671 $(DBUS_LIBS) \
2674 endef
2676 else # ENABLE_DBUS
2678 define gb_LinkTarget__use_dbus
2680 endef
2682 endif # ENABLE_DBUS
2685 ifneq ($(SYSTEM_LIBPNG),)
2687 define gb_LinkTarget__use_libpng
2688 $(call gb_LinkTarget_set_include,$(1),\
2689 $$(INCLUDE) \
2690 $(LIBPNG_CFLAGS) \
2693 $(call gb_LinkTarget_add_libs,$(1),\
2694 $(LIBPNG_LIBS) \
2697 endef
2699 gb_ExternalProject__use_libpng :=
2701 else # !SYSTEM_LIBPNG
2703 define gb_LinkTarget__use_libpng
2704 $(call gb_LinkTarget_set_include,$(1),\
2705 $(LIBPNG_CFLAGS) \
2706 $$(INCLUDE) \
2708 $(call gb_LinkTarget_use_static_libraries,$(1),\
2709 libpng \
2711 $(call gb_LinkTarget__use_zlib,$(1))
2713 endef
2715 define gb_ExternalProject__use_libpng
2716 $(call gb_ExternalProject_use_static_libraries,$(1),\
2717 libpng \
2720 endef
2722 endif # !SYSTEM_LIBPNG
2725 ifneq ($(SYSTEM_CURL),)
2727 define gb_LinkTarget__use_curl
2728 $(call gb_LinkTarget_add_defs,$(1),\
2729 -DSYSTEM_CURL \
2731 $(call gb_LinkTarget_set_include,$(1),\
2732 $$(INCLUDE) \
2733 $(CURL_CFLAGS) \
2735 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2737 endef
2739 else # !SYSTEM_CURL
2741 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2742 curl \
2745 define gb_LinkTarget__use_curl
2746 $(call gb_LinkTarget_use_package,$(1),curl)
2747 $(call gb_LinkTarget_set_include,$(1),\
2748 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2749 $$(INCLUDE) \
2752 ifeq ($(COM),MSC)
2753 $(call gb_LinkTarget_add_libs,$(1),\
2754 $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-ipv6-sspi-winssl/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
2756 else
2757 $(call gb_LinkTarget_add_libs,$(1),\
2758 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2760 endif
2762 endef
2764 endif # SYSTEM_CURL
2766 ifeq ($(ENABLE_VALGRIND),TRUE)
2768 define gb_LinkTarget__use_valgrind
2769 $(call gb_LinkTarget_add_defs,$(1),\
2770 -DHAVE_VALGRIND_HEADERS \
2773 $(call gb_LinkTarget_set_include,$(1),\
2774 $$(INCLUDE) \
2775 $(VALGRIND_CFLAGS) \
2778 endef
2780 else # !ENABLE_VALGRIND
2782 define gb_LinkTarget__use_valgrind
2784 endef
2786 endif # ENABLE_VALGRIND
2788 ifeq ($(ENABLE_POPPLER),TRUE)
2790 ifneq ($(SYSTEM_POPPLER),)
2792 define gb_LinkTarget__use_poppler
2793 $(call gb_LinkTarget_set_include,$(1),\
2794 $(POPPLER_CFLAGS) \
2795 $$(INCLUDE) \
2798 $(call gb_LinkTarget_add_libs,$(1),\
2799 $(POPPLER_LIBS) \
2802 endef
2804 else # !SYSTEM_POPPLER
2806 define gb_LinkTarget__use_poppler
2807 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2809 $(call gb_LinkTarget_set_include,$(1),\
2810 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2811 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2812 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2813 $$(INCLUDE) \
2816 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2818 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2820 ifeq ($(OS),MACOSX)
2821 $(call gb_LinkTarget_add_libs,$(1),\
2822 -lobjc \
2824 else ifeq ($(OS),LINUX)
2825 $(call gb_LinkTarget_add_libs,$(1),\
2826 -pthread \
2828 else ifeq ($(OS),WNT)
2829 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2830 advapi32 \
2831 gdi32 \
2833 endif
2835 endef
2837 endif # SYSTEM_POPPLER
2839 endif # ENABLE_POPPLER
2842 ifneq ($(SYSTEM_CLUCENE),)
2844 define gb_LinkTarget__use_clucene
2845 $(call gb_LinkTarget_add_defs,$(1),\
2846 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2849 $(call gb_LinkTarget_set_include,$(1),\
2850 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2851 $$(INCLUDE) \
2854 $(call gb_LinkTarget_add_libs,$(1),\
2855 $(CLUCENE_LIBS) \
2858 endef
2860 else # !SYSTEM_CLUCENE
2862 define gb_LinkTarget__use_clucene
2863 $(call gb_LinkTarget_set_include,$(1),\
2864 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2865 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2866 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2867 $$(INCLUDE) \
2870 $(call gb_LinkTarget_use_libraries,$(1),\
2871 clucene \
2874 endef
2876 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2877 clucene \
2880 endif # SYSTEM_CLUCENE
2882 define gb_LinkTarget__use_gobject
2883 $(call gb_LinkTarget_add_libs,$(1),\
2884 $(GOBJECT_LIBS) \
2887 $(call gb_LinkTarget_set_include,$(1),\
2888 $$(INCLUDE) \
2889 $(GOBJECT_CFLAGS) \
2891 endef
2893 ifneq ($(SYSTEM_HSQLDB),)
2895 define gb_LinkTarget__use_hsqldb
2897 $(call gb_LinkTarget_add_defs,$(1),\
2898 -DSYSTEM_HSQLDB \
2899 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2902 endef
2904 else # !SYSTEM_HSQLDB
2906 define gb_LinkTarget__use_hsqldb
2908 endef
2910 endif # SYSTEM_HSQLDB
2912 ifeq ($(ENABLE_LDAP),TRUE)
2913 ifneq ($(SYSTEM_OPENLDAP),)
2915 define gb_LinkTarget__use_openldap
2917 $(call gb_LinkTarget_add_libs,$(1),\
2918 -lldap \
2919 -llber \
2922 endef
2924 gb_ExternalProject__use_openldap :=
2926 else # !SYSTEM_OPENLDAP
2928 define gb_LinkTarget__use_openldap
2929 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2930 $(call gb_LinkTarget_set_include,$(1),\
2931 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2932 $$(INCLUDE) \
2934 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2935 $(call gb_LinkTarget_add_libs,$(1), \
2936 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2937 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2940 endef
2941 endif
2943 define gb_ExternalProject__use_openldap
2944 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2946 endef
2948 endif # SYSTEM_OPENLDAP
2950 ifneq ($(SYSTEM_LIBTOMMATH),)
2952 define gb_LinkTarget__use_libtommath
2953 $(call gb_LinkTarget_set_include,$(1),\
2954 $(LIBTOMMATH_CFLAGS) \
2955 $$(INCLUDE) \
2957 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2959 endef
2961 else # !SYSTEM_LIBTOMMATH
2962 define gb_LinkTarget__use_libtommath
2963 $(call gb_LinkTarget_set_include,$(1),\
2964 -I${WORKDIR}/UnpackedTarball/libtommath \
2965 $$(INCLUDE) \
2967 $(call gb_LinkTarget_add_libs,$(1),\
2968 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2970 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2972 endef
2974 endif # SYSTEM_LIBTOMMATH
2976 define gb_ExternalProject__use_libtommath
2977 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2979 endef
2981 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2983 ifneq ($(SYSTEM_FIREBIRD),)
2985 define gb_LinkTarget__use_libfbembed
2986 $(call gb_LinkTarget_set_include,$(1),\
2987 $(FIREBIRD_CFLAGS) \
2988 $$(INCLUDE) \
2990 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2992 endef
2994 else # !SYSTEM_FIREBIRD
2996 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2997 firebird \
3000 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3001 #$(call gb_LinkTarget__use_libtommath,$(1))
3003 define gb_LinkTarget__use_libfbembed
3004 $(call gb_LinkTarget_use_package,$(1),firebird)
3005 $(call gb_LinkTarget_set_include,$(1),\
3006 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3007 $$(INCLUDE) \
3009 ifeq ($(COM),MSC)
3010 $(call gb_LinkTarget_add_libs,$(1),\
3011 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3013 else
3014 $(call gb_LinkTarget_add_libs,$(1),\
3015 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3017 endif
3019 endef
3022 # endef
3024 endif # SYSTEM_FIREBIRD
3026 else # !ENABLE_FIREBIRD_SDBC
3028 gb_LinkTarget__use_firebird :=
3029 # gb_LinkTarget__use_atomic_ops :=
3030 # gb_LinkTarget__use_libtommath :=
3032 endif # ENABLE_FIREBIRD_SDBC
3035 ifneq ($(SYSTEM_POSTGRESQL),)
3037 define gb_LinkTarget__use_postgresql
3039 $(call gb_LinkTarget_set_include,$(1),\
3040 $(POSTGRESQL_INC) \
3041 $$(INCLUDE) \
3044 $(call gb_LinkTarget_add_libs,$(1),\
3045 -lpq \
3048 $(call gb_LinkTarget_add_ldflags,$(1),\
3049 $(POSTGRESQL_LIB) \
3052 endef
3054 else # !SYSTEM_POSTGRESQL
3056 define gb_LinkTarget__use_postgresql
3058 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
3060 $(call gb_LinkTarget_set_include,$(1),\
3061 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3062 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3063 $$(INCLUDE) \
3066 $(call gb_LinkTarget_add_libs,$(1),\
3067 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3070 ifeq ($(OS),WNT)
3071 $(call gb_LinkTarget_use_external,$(1),openssl)
3073 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3074 secur32 \
3075 ws2_32 \
3078 endif
3080 endef
3082 endif # SYSTEM_POSTGRESQL
3084 ifeq ($(ENABLE_KF5),TRUE)
3086 define gb_LinkTarget__use_kf5
3087 $(call gb_LinkTarget_set_include,$(1),\
3088 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3089 $$(INCLUDE) \
3092 $(call gb_LinkTarget_add_cxxflags,$(1),\
3093 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3096 $(call gb_LinkTarget_add_libs,$(1),\
3097 $(KF5_LIBS) \
3100 endef
3102 else # !ENABLE_KF5
3104 define gb_LinkTarget__use_kf5
3106 endef
3108 endif # ENABLE_KF5
3112 ifeq ($(ENABLE_QT5),TRUE)
3114 define gb_LinkTarget__use_qt5
3115 $(call gb_LinkTarget_set_include,$(1),\
3116 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3117 $$(INCLUDE) \
3120 $(call gb_LinkTarget_add_defs,$(1),\
3121 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3124 $(call gb_LinkTarget_add_libs,$(1),\
3125 $(QT5_LIBS) \
3128 endef
3130 else # !ENABLE_QT5
3132 define gb_LinkTarget__use_qt5
3134 endef
3136 endif # ENABLE_QT5
3138 # PYTHON
3139 # extra python_headers external because pyuno wrapper must not link python
3140 ifneq ($(SYSTEM_PYTHON),)
3142 define gb_LinkTarget__use_python_headers
3143 $(call gb_LinkTarget_add_defs,$(1),\
3144 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3147 $(call gb_LinkTarget_set_include,$(1),\
3148 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3149 $$(INCLUDE) \
3152 endef
3154 define gb_LinkTarget__use_python
3155 $(call gb_LinkTarget__use_python_headers,$(1))
3157 $(call gb_LinkTarget_add_libs,$(1),\
3158 $(PYTHON_LIBS) \
3161 endef
3163 else # !SYSTEM_PYTHON
3165 $(eval $(call gb_Helper_register_packages_for_install,python,\
3166 python3 \
3169 define gb_LinkTarget__use_python_headers
3170 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3171 $(call gb_LinkTarget_set_include,$(1),\
3172 -I$(call gb_UnpackedTarball_get_dir,python3) \
3173 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3174 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3175 $$(INCLUDE) \
3178 endef
3180 define gb_LinkTarget__use_python
3181 $(call gb_LinkTarget__use_python_headers,$(1))
3182 ifeq ($(OS),MACOSX)
3183 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3184 else
3185 $(call gb_LinkTarget_use_package,$(1),python3)
3186 endif
3188 ifeq ($(OS),WNT)
3189 $(call gb_LinkTarget_add_libs,$(1),\
3190 $(call gb_UnpackedTarball_get_dir,python3)/PCbuild/$(if $(filter X86_64,$(CPUNAME)),amd64,win32)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).lib \
3192 else ifeq ($(OS),MACOSX)
3193 $(call gb_LinkTarget_add_libs,$(1),\
3194 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3196 else
3197 $(call gb_LinkTarget_add_libs,$(1),\
3198 -L$(call gb_UnpackedTarball_get_dir,python3) \
3199 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3201 endif
3203 endef
3205 # this is only used by python currently
3206 define gb_ExternalProject__use_libffi
3207 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3209 endef
3211 endif # SYSTEM_PYTHON
3213 # ORCUS
3214 ifneq ($(SYSTEM_LIBORCUS),)
3216 define gb_LinkTarget__use_orcus
3217 $(call gb_LinkTarget_set_include,$(1),\
3218 $$(INCLUDE) \
3219 $(ORCUS_CFLAGS) \
3221 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3222 endef
3224 define gb_LinkTarget__use_orcus-parser
3226 endef
3228 else # !SYSTEM_LIBORCUS
3230 ifeq ($(COM),MSC)
3232 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3233 orcus \
3234 orcus-parser \
3237 define gb_LinkTarget__use_orcus
3238 $(call gb_LinkTarget_set_include,$(1),\
3239 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3240 $$(INCLUDE) \
3243 $(call gb_LinkTarget_use_libraries,$(1),\
3244 orcus \
3247 endef
3249 define gb_LinkTarget__use_orcus-parser
3250 $(call gb_LinkTarget_set_include,$(1),\
3251 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3252 $$(INCLUDE) \
3255 $(call gb_LinkTarget_use_libraries,$(1),\
3256 orcus-parser \
3259 endef
3261 else # !MSC
3263 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3264 liborcus \
3267 define gb_LinkTarget__use_orcus
3268 $(call gb_LinkTarget_use_package,$(1),liborcus)
3270 $(call gb_LinkTarget_set_include,$(1),\
3271 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3272 $$(INCLUDE) \
3275 $(call gb_LinkTarget_add_libs,$(1),\
3276 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.15 \
3279 $(if $(SYSTEM_BOOST), \
3280 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3281 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3284 endef
3286 define gb_LinkTarget__use_orcus-parser
3287 $(call gb_LinkTarget_use_package,$(1),liborcus)
3289 $(call gb_LinkTarget_set_include,$(1),\
3290 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3291 $$(INCLUDE) \
3294 $(call gb_LinkTarget_add_libs,$(1),\
3295 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.15 \
3298 endef
3300 endif # MSC
3302 endif # SYSTEM_LIBORCUS
3304 ifeq ($(ENABLE_EOT),TRUE)
3306 ifneq ($(SYSTEM_LIBEOT),)
3308 define gb_LinkTarget__use_libeot
3309 $(call gb_LinkTarget_set_include,$(1),\
3310 $$(INCLUDE) \
3311 $(LIBEOT_CFLAGS) \
3313 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3315 endef
3317 gb_ExternalProject__use_libeot :=
3319 else # !SYSTEM_LIBEOT
3321 define gb_LinkTarget__use_libeot
3322 $(call gb_LinkTarget_set_include,$(1),\
3323 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3324 $$(INCLUDE) \
3326 $(call gb_LinkTarget_add_libs,$(1),\
3327 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3329 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3331 endef
3333 define gb_ExternalProject__use_libeot
3334 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3336 endef
3338 endif # SYSTEM_LIBEOT
3340 else # !ENABLE_EOT
3342 gb_LinkTarget__use_libeot :=
3343 gb_ExternalProject__use_libeot :=
3345 endif # ENABLE_EOT
3347 ### X11 stuff ###
3349 ifeq ($(USING_X11), TRUE)
3351 define gb_LinkTarget__use_Xrandr
3352 $(call gb_LinkTarget_set_include,$(1),\
3353 $$(INCLUDE) \
3354 $(XRANDR_CFLAGS) \
3357 $(call gb_LinkTarget_add_libs,$(1),\
3358 $(XRANDR_LIBS) \
3360 endef
3362 define gb_LinkTarget__use_Xrender
3363 $(call gb_LinkTarget_set_include,$(1),\
3364 $$(INCLUDE) \
3365 $(XRENDER_CFLAGS) \
3368 $(call gb_LinkTarget_add_libs,$(1),\
3369 $(XRENDER_LIBS) \
3371 endef
3373 endif # USING_X11
3376 gb_ExternalProject__use_nss3:=
3379 ifneq ($(SYSTEM_NSS),)
3381 define gb_LinkTarget__use_nss3
3382 $(call gb_LinkTarget_add_defs,$(1),\
3383 -DSYSTEM_NSS \
3386 $(call gb_LinkTarget_set_include,$(1),\
3387 $$(INCLUDE) \
3388 $(NSS_CFLAGS) \
3391 $(call gb_LinkTarget_add_libs,$(1),\
3392 $(NSS_LIBS) \
3395 endef
3397 define gb_LinkTarget__use_plc4
3398 $(call gb_LinkTarget__use_nss3,$(1))
3400 endef
3402 define gb_LinkTarget__use_ssl3
3403 $(call gb_LinkTarget__use_nss3,$(1))
3405 endef
3407 else # !SYSTEM_NSS
3409 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3410 nss \
3413 define gb_LinkTarget__use_nss3
3414 $(call gb_LinkTarget_use_package,$(1),nss)
3415 $(call gb_LinkTarget_set_include,$(1),\
3416 $$(INCLUDE) \
3417 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3418 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3421 ifeq ($(COM),MSC)
3422 $(call gb_LinkTarget_add_libs,$(1),\
3423 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3424 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3425 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3427 else
3428 $(call gb_LinkTarget_add_libs,$(1),\
3429 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3430 -lnspr4 \
3431 -lnss3 \
3432 -lsmime3 \
3434 endif
3436 endef
3438 define gb_LinkTarget__use_plc4
3439 $(call gb_LinkTarget_use_package,$(1),nss)
3440 ifeq ($(COM),MSC)
3441 $(call gb_LinkTarget_add_libs,$(1),\
3442 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3444 else
3445 $(call gb_LinkTarget_add_libs,$(1),\
3446 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3448 endif
3450 endef
3452 define gb_LinkTarget__use_ssl3
3453 $(call gb_LinkTarget_use_package,$(1),nss)
3454 ifeq ($(COM),MSC)
3455 $(call gb_LinkTarget_add_libs,$(1),\
3456 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3458 else
3459 $(call gb_LinkTarget_add_libs,$(1),\
3460 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3462 endif
3464 endef
3466 define gb_ExternalProject__use_nss3
3467 $(call gb_ExternalProject_use_package,$(1),nss)
3469 endef
3471 endif # SYSTEM_NSS
3473 ifeq ($(ENABLE_BREAKPAD),TRUE)
3475 define gb_LinkTarget__use_breakpad
3476 $(call gb_LinkTarget_set_include,$(1),\
3477 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3478 $$(INCLUDE) \
3481 ifeq ($(COM),MSC)
3482 $(call gb_LinkTarget_use_static_libraries,$(1),\
3483 breakpad \
3485 else
3486 $(call gb_LinkTarget_add_libs,$(1),\
3487 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3489 endif
3491 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3493 endef
3495 endif # ENABLE_BREAKPAD
3497 ifeq ($(ENABLE_GPGMEPP),TRUE)
3499 ifneq ($(SYSTEM_GPGMEPP),)
3501 gb_ExternalProject__use_gpgmepp:=
3502 gb_ExternalProject__use_libassuan:=
3503 gb_ExternalProject__use_libgpg-error:=
3505 define gb_LinkTarget__use_gpgmepp
3506 $(call gb_LinkTarget_set_include,$(1),\
3507 $$(INCLUDE) \
3508 $$(GPGMEPP_CFLAGS) \
3511 $(call gb_LinkTarget_add_libs,$(1),\
3512 $(GPGMEPP_LIBS) \
3515 endef
3517 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3519 define gb_ExternalProject__use_gpgmepp
3520 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3522 endef
3523 define gb_ExternalProject__use_libassuan
3524 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3526 endef
3527 define gb_ExternalProject__use_libgpg-error
3528 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3530 endef
3532 ifneq ($(filter WNT,$(OS)),)
3534 define gb_LinkTarget__use_libgpg-error
3535 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3537 $(call gb_LinkTarget_set_include,$(1),\
3538 $(GPG_ERROR_CFLAGS) \
3539 $$(INCLUDE) \
3541 $(call gb_LinkTarget_add_libs,$(1),\
3542 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3545 endef
3547 define gb_LinkTarget__use_libassuan
3548 $(call gb_LinkTarget_use_package,$(1),libassuan)
3550 $(call gb_LinkTarget_set_include,$(1),\
3551 $(LIBASSUAN_CFLAGS) \
3552 $$(INCLUDE) \
3554 $(call gb_LinkTarget_add_libs,$(1),\
3555 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3558 endef
3560 define gb_LinkTarget__use_gpgmepp
3561 $(call gb_LinkTarget_set_include,$(1),\
3562 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3563 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3564 $$(GPG_ERROR_CFLAGS) \
3565 $$(INCLUDE) \
3567 $(call gb_LinkTarget_use_libraries,$(1),\
3568 gpgmepp \
3571 endef
3573 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3574 libassuan \
3575 libgpg-error \
3578 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3579 gpgmepp \
3582 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
3583 gpgme-w32spawn \
3586 endif
3588 ifneq ($(filter MACOSX LINUX,$(OS)),)
3590 define gb_LinkTarget__use_gpgmepp
3591 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3593 $(call gb_LinkTarget_set_include,$(1),\
3594 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3595 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3596 $$(GPG_ERROR_CFLAGS) \
3597 $$(INCLUDE) \
3599 $(call gb_LinkTarget_add_libs,$(1),\
3600 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3601 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3602 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3603 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3606 endef
3608 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3609 gpgmepp \
3610 libassuan \
3611 libgpg-error \
3614 endif
3616 endif
3618 else # !ENABLE_GPGMEPP
3620 gb_ExternalProject__use_gpgmepp :=
3621 gb_ExternalProject__use_libassuan :=
3622 gb_ExternalProject__use_libgpg-error :=
3624 gb_LinkTarget__use_gpgmepp :=
3625 gb_LinkTarget__use_libassuan :=
3626 gb_LinkTarget__use_libgpg-error :=
3628 endif # ENABLE_GPGMEPP
3630 define gb_LinkTarget__use_dconf
3631 $(call gb_LinkTarget_set_include,$(1),\
3632 $$(INCLUDE) \
3633 $(DCONF_CFLAGS) \
3636 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3637 endef
3639 ### Jars ############################################################
3641 ifneq ($(SYSTEM_HSQLDB),)
3643 define gb_Jar__use_hsqldb
3644 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3645 endef
3646 define gb_JunitTest__use_hsqldb
3647 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3648 endef
3650 else # !SYSTEM_HSQLDB
3652 ifeq ($(ENABLE_JAVA),TRUE)
3653 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3654 hsqldb \
3656 endif
3658 define gb_Jar__use_hsqldb
3659 $(call gb_Jar_use_jar,$(1),hsqldb)
3660 endef
3661 define gb_JunitTest__use_hsqldb
3662 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3663 endef
3665 endif # SYSTEM_HSQLDB
3668 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3670 ifneq ($(SYSTEM_BSH),)
3672 define gb_Jar__use_bsh
3673 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3674 endef
3676 else # !SYSTEM_BSH
3678 ifeq ($(ENABLE_JAVA),TRUE)
3679 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3680 bsh \
3682 endif
3684 define gb_Jar__use_bsh
3685 $(call gb_Jar_use_jar,$(1),bsh)
3686 endef
3688 endif # SYSTEM_BSH
3690 endif
3692 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3694 ifneq ($(SYSTEM_RHINO),)
3696 define gb_Jar__use_rhino
3697 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3698 endef
3700 else # !SYSTEM_RHINO
3702 ifeq ($(ENABLE_JAVA),TRUE)
3703 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3704 js \
3706 endif
3708 define gb_Jar__use_rhino
3709 $(call gb_Jar_use_jar,$(1),js)
3710 endef
3712 endif # SYSTEM_RHINO
3714 endif
3716 ifneq ($(SYSTEM_APACHE_COMMONS),)
3718 define gb_Jar__use_commons-logging
3719 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3720 endef
3721 gb_ExternalProject__use_commons-logging :=
3723 else # !SYSTEM_APACHE_COMMONS
3725 ifeq ($(ENABLE_JAVA),TRUE)
3726 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3727 commons-logging-$(COMMONS_LOGGING_VERSION) \
3729 endif
3731 define gb_Jar__use_commons-logging
3732 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3733 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3734 endef
3735 define gb_ExternalProject__use_commons-logging
3736 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3737 endef
3739 endif # SYSTEM_APACHE_COMMONS
3742 ifneq ($(SYSTEM_JFREEREPORT),)
3744 define gb_Jar__use_flow-engine
3745 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3746 endef
3748 define gb_Jar__use_flute
3749 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3750 endef
3752 define gb_Jar__use_libbase
3753 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3754 endef
3756 define gb_Jar__use_libfonts
3757 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3758 endef
3760 define gb_Jar__use_libformula
3761 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3762 endef
3764 define gb_Jar__use_liblayout
3765 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3766 endef
3768 define gb_Jar__use_libloader
3769 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3770 endef
3772 define gb_Jar__use_librepository
3773 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3774 endef
3776 define gb_Jar__use_libserializer
3777 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3778 endef
3780 define gb_Jar__use_libxml
3781 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3782 endef
3784 define gb_Jar__use_sac
3785 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3786 endef
3788 else # !SYSTEM_JFREEREPORT
3790 ifeq ($(ENABLE_JAVA),TRUE)
3791 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3792 flow-engine \
3793 flute-1.1.6 \
3794 libbase-1.1.6 \
3795 libfonts-1.1.6 \
3796 libformula-1.1.7 \
3797 liblayout \
3798 libloader-1.1.6 \
3799 librepository-1.1.6 \
3800 libserializer-1.1.6 \
3801 libxml-1.1.7 \
3802 sac \
3804 endif
3806 define gb_Jar__use_flow-engine
3807 $(call gb_Jar_use_jar,$(1),flow-engine)
3808 endef
3810 define gb_Jar__use_flute
3811 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3812 endef
3814 define gb_Jar__use_libbase
3815 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3816 endef
3818 define gb_Jar__use_libfonts
3819 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3820 endef
3822 define gb_Jar__use_libformula
3823 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3824 endef
3826 define gb_Jar__use_liblayout
3827 $(call gb_Jar_use_jar,$(1),liblayout)
3828 endef
3830 define gb_Jar__use_libloader
3831 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3832 endef
3834 define gb_Jar__use_librepository
3835 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3836 endef
3838 define gb_Jar__use_libserializer
3839 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3840 endef
3842 define gb_Jar__use_libxml
3843 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3844 endef
3846 define gb_Jar__use_sac
3847 $(call gb_Jar_use_jar,$(1),sac)
3848 endef
3850 endif # SYSTEM_JFREEREPORT
3853 # Executables
3855 # FIXME: the library target should be for build too
3856 define gb_Executable__register_bestreversemap
3857 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3858 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3860 endef
3862 # TODO depending on the whole URE might be overkill, but I do not have a
3863 # Windows machine to debug it...
3864 # FIXME: the library target should be for build too
3865 define gb_Executable__register_climaker
3866 $(call gb_Executable_add_runtime_dependencies,climaker,\
3867 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3868 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3869 $(call gb_UnoApi_get_target,udkapi) \
3870 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3872 endef
3874 define gb_Executable__register_cppumaker
3875 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3876 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3878 endef
3880 # This is used to determine what we need for 'build' platform.
3881 # FIXME: the library target should be for build too
3882 define gb_Executable__register_gengal
3883 $(call gb_Executable_add_runtime_dependencies,gengal,\
3884 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3885 $(call gb_Package_get_target_for_build,postprocess_images) \
3886 $(call gb_Package_get_target_for_build,postprocess_registry) \
3887 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3888 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3889 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3890 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3891 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3892 $(call gb_UnoApi_get_target,offapi) \
3893 $(call gb_UnoApi_get_target,udkapi) \
3895 endef
3897 ifeq ($(SYSTEM_ICU),)
3899 define gb_Executable__register_gendict
3900 $(call gb_Executable_add_runtime_dependencies,gendict,\
3901 $(call gb_Package_get_target_for_build,icu) \
3902 $(call gb_Package_get_target_for_build,icu_ure) \
3904 endef
3906 endif
3908 define gb_Executable__register_idlc
3909 $(call gb_Executable_add_runtime_dependencies,idlc,\
3910 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3912 endef
3914 define gb_Executable__register_localize
3915 $(call gb_Executable_add_runtime_dependencies,localize,\
3916 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3917 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3920 endef
3922 # FIXME ure/services.rdb needs cleanup
3923 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3924 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3925 # FIXME: the library target should be for build too
3926 define gb_Executable__register_saxparser
3927 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3928 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3929 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3930 $(call gb_Rdb_get_target_for_build,saxparser) \
3931 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3932 $(call gb_UnoApi_get_target,udkapi) \
3934 endef
3936 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3937 # required due to the settings for URE_SERVICES and URE_TYPES in
3938 # cppuhelper/source/unorc
3939 # FIXME: the library target should be for build too
3940 define gb_Executable__register_uno
3941 $(call gb_Executable_add_runtime_dependencies,uno,\
3942 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3943 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3944 $(call gb_UnoApi_get_target,udkapi) \
3946 endef
3949 # External executables
3951 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3953 gb_ExternalExecutable__register_xmllint :=
3955 else # ! SYSTEM_LIBXML_FOR_BUILD
3957 define gb_ExternalExecutable__register_xmllint
3958 $(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)
3959 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3960 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3961 $(call gb_Package_get_target,libxml2) \
3964 endef
3966 endif # SYSTEM_LIBXML_FOR_BUILD
3968 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3970 gb_ExternalExecutable__register_xsltproc :=
3972 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3974 define gb_ExternalExecutable__register_xsltproc
3975 $(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)
3976 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3977 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3978 $(call gb_Package_get_target,libxml2) \
3979 $(call gb_Package_get_target,libxslt) \
3982 endef
3984 endif # SYSTEM_LIBXSLT_FOR_BUILD
3986 ifneq (,$(SYSTEM_UCPP))
3988 gb_ExternalExecutable__register_ucpp :=
3990 else # ! SYSTEM_UCPP
3992 define gb_ExternalExecutable__register_ucpp
3993 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3995 endef
3997 endif # SYSTEM_UCPP
3999 ifeq (,$(PYTHON_FOR_BUILD))
4001 define gb_ExternalExecutable__register_python
4002 ifeq ($(OS),MACOSX)
4004 # use set_external, to avoid having the command added as prerequisite for the
4005 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4006 # matching rule to build that specific file)
4007 $(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))
4008 # the Zip ensures that internal python has been built (cannot use the Package
4009 # target, as that is not used on Mac)
4010 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4012 else
4014 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4015 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4016 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4018 endif
4020 endef
4022 else
4024 define gb_ExternalExecutable__register_python
4025 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4027 endef
4029 endif # PYTHON_FOR_BUILD
4031 ifneq ($(SYSTEM_GENBRK),)
4033 define gb_ExternalExecutable__register_genbrk
4034 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4036 endef
4038 else # ! SYSTEM_GENBRK
4040 define gb_ExternalExecutable__register_genbrk
4041 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4042 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4043 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4044 $(call gb_Package_get_target_for_build,icu) \
4045 $(call gb_Package_get_target_for_build,icu_ure) \
4048 endef
4050 endif
4052 ifneq ($(SYSTEM_GENCCODE),)
4054 define gb_ExternalExecutable__register_genccode
4055 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4057 endef
4059 else # ! SYSTEM_GENCCODE
4061 define gb_ExternalExecutable__register_genccode
4062 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4063 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4064 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4065 $(call gb_Package_get_target_for_build,icu) \
4066 $(call gb_Package_get_target_for_build,icu_ure) \
4069 endef
4071 endif
4073 ifneq ($(SYSTEM_GENCMN),)
4075 define gb_ExternalExecutable__register_gencmn
4076 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4078 endef
4080 else # ! SYSTEM_GENCMN
4082 define gb_ExternalExecutable__register_gencmn
4083 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4084 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4085 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4086 $(call gb_Package_get_target_for_build,icu) \
4087 $(call gb_Package_get_target_for_build,icu_ure) \
4090 endef
4092 endif
4094 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4096 $(eval $(call gb_Helper_register_jars,OXT,\
4097 owncloud-android-library \
4100 define gb_Jar__use_owncloud_android_lib
4101 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4102 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4103 endef
4104 define gb_ExternalProject__use_owncloud_android_lib
4105 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4106 endef
4108 endif
4110 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4111 ifneq ($(SYSTEM_BZIP2),)
4113 define gb_LinkTarget__use_bzip2
4114 $(call gb_LinkTarget_set_include,$(1),\
4115 $(BZIP2_CFLAGS) \
4116 $$(INCLUDE) \
4118 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4120 endef
4122 gb_ExternalProject__use_bzip2 :=
4124 else # !SYSTEM_BZIP2
4126 define gb_LinkTarget__use_bzip2
4127 $(call gb_LinkTarget_set_include,$(1),\
4128 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4129 $$(INCLUDE) \
4132 ifeq ($(COM),MSC)
4133 $(call gb_LinkTarget_add_libs,$(1),\
4134 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4136 else
4137 $(call gb_LinkTarget_add_libs,$(1),\
4138 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4140 endif
4142 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4143 endef
4145 define gb_ExternalProject__use_bzip2
4146 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4147 endef
4149 endif
4150 endif
4152 define gb_LinkTarget__use_clew
4153 $(call gb_LinkTarget_set_include,$(1), \
4154 -I$(SRCDIR)/external/clew/source/include \
4155 $$(INCLUDE) \
4157 $(call gb_LinkTarget_use_libraries,$(1),clew)
4158 endef
4160 ifneq ($(ENABLE_PDFIUM),)
4161 define gb_LinkTarget__use_pdfium
4162 $(call gb_LinkTarget_set_include,$(1),\
4163 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4164 -DCOMPONENT_BUILD \
4165 $$(INCLUDE) \
4167 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4168 endef
4169 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4170 pdfium \
4172 endif
4174 ifneq ($(SYSTEM_QRCODEGEN),)
4176 define gb_LinkTarget__use_qrcodegen
4177 $(call gb_LinkTarget_set_include,$(1),\
4178 -DSYSTEM_QRCODEGEN \
4179 $$(INCLUDE) \
4180 $(QRCODEGEN_CFLAGS) \
4182 $(call gb_LinkTarget_add_libs,$(1),$(QRCODEGEN_LIBS))
4184 endef
4186 gb_ExternalProject__use_qrcodegen :=
4188 else # !SYSTEM_QRCODEGEN
4190 define gb_LinkTarget__use_qrcodegen
4191 $(call gb_LinkTarget_use_unpacked,$(1),qrcodegen)
4192 $(call gb_LinkTarget_set_include,$(1),\
4193 -I$(call gb_UnpackedTarball_get_dir,qrcodegen/cpp/)\
4194 $$(INCLUDE) \
4196 $(call gb_LinkTarget_use_static_libraries,$(1),\
4197 qrcodegen \
4200 endef
4202 define gb_ExternalProject__use_qrcodegen
4203 $(call gb_ExternalProject_use_static_libraries,$(1),qrcodegen)
4205 endef
4207 endif # SYSTEM_QRCODEGEN
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 # vim: set noet sw=4 ts=4: