tdf#42949 Add back includes to binaryurp/
[LibreOffice.git] / RepositoryExternal.mk
blob405ad054510e62499135248812af4f3a50e3131e
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 gb_LinkTarget__use_glm_headers :=
94 gb_ExternalProject__use_glm_headers :=
96 else
98 define gb_LinkTarget__use_glm_headers
99 $(call gb_LinkTarget_use_unpacked,$(1),glm)
100 $(call gb_LinkTarget_set_include,$(1),\
101 $(GLM_CFLAGS) \
102 $$(INCLUDE) \
105 endef
107 define gb_ExternalProject__use_glm_headers
108 $(call gb_ExternalProject_use_unpacked,$(1),glm)
110 endef
112 endif
114 ifneq ($(ENABLE_SKIA),)
115 define gb_LinkTarget__use_skia
116 $(call gb_LinkTarget_set_include,$(1),\
117 -I$(call gb_UnpackedTarball_get_dir,skia)/include/core \
118 -I$(call gb_UnpackedTarball_get_dir,skia)/include/effects \
119 -I$(call gb_UnpackedTarball_get_dir,skia)/include/gpu \
120 -I$(call gb_UnpackedTarball_get_dir,skia)/include/config \
121 -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan \
122 -I$(call gb_UnpackedTarball_get_dir,skia)/tools/gpu \
123 -I$(call gb_UnpackedTarball_get_dir,skia) \
124 $$(INCLUDE) \
126 $(call gb_LinkTarget_use_libraries,$(1),skia)
127 $(call gb_LinkTarget_add_defs,$(1),\
128 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
129 -DSKIA_DLL \
131 endef
132 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
133 skia \
135 endif
137 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
139 define gb_LinkTarget__use_sane_headers
140 $(call gb_LinkTarget_set_include,$(1),\
141 $(if $(filter WNT,$(OS)), \
142 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
143 -I$(SRCDIR)/external/sane/inc) \
144 $$(INCLUDE) \
147 ifeq ($(OS),WNT)
148 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
149 endif
151 endef
153 else
155 gb_LinkTarget__use_sane_headers :=
157 endif
159 ifneq ($(SYSTEM_BLUEZ),)
161 gb_LinkTarget__use_bluez_bluetooth_headers :=
163 else # !SYSTEM_BLUEZ
165 define gb_LinkTarget__use_bluez_bluetooth_headers
166 $(call gb_LinkTarget_set_include,$(1),\
167 -I$(SRCDIR)/external/bluez_bluetooth/inc \
168 $$(INCLUDE) \
171 endef
173 endif # SYSTEM_BLUEZ
175 # External libraries
177 ifneq ($(SYSTEM_CPPUNIT),)
179 define gb_LinkTarget__use_cppunit
180 $(call gb_LinkTarget_set_include,$(1),\
181 $$(INCLUDE) \
182 $(CPPUNIT_CFLAGS) \
185 $(call gb_LinkTarget_add_libs,$(1),\
186 $(CPPUNIT_LIBS) \
189 endef
191 else # !SYSTEM_CPPUNIT
193 define gb_LinkTarget__use_cppunit
194 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
196 $(call gb_LinkTarget_set_include,$(1),\
197 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
198 $$(INCLUDE) \
201 ifeq ($(COM),MSC)
202 $(call gb_LinkTarget_add_libs,$(1),\
203 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
205 else
206 $(call gb_LinkTarget_add_libs,$(1),\
207 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
209 endif
211 endef
213 endif # SYSTEM_CPPUNIT
215 ifneq ($(SYSTEM_EPOXY),)
217 define gb_LinkTarget__use_epoxy
218 $(call gb_LinkTarget_set_include,$(1),\
219 $$(INCLUDE) \
220 $(EPOXY_CFLAGS) \
222 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
224 endef
226 gb_ExternalProject__use_epoxy :=
228 else # !SYSTEM_EPOXY
230 define gb_LinkTarget__use_epoxy
231 $(call gb_LinkTarget_set_include,$(1),\
232 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
233 $$(INCLUDE) \
236 $(call gb_LinkTarget_use_libraries,$(1),\
237 epoxy \
240 endef
242 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
243 epoxy \
246 define gb_ExternalProject__use_epoxy
247 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
249 endef
251 endif # SYSTEM_EPOXY
253 define gb_LinkTarget__use_iconv
254 ifeq ($(COM),MSC)
255 $(call gb_LinkTarget_add_libs,$(1),libiconv.lib)
256 else
257 $(call gb_LinkTarget_add_libs,$(1),-liconv)
258 endif
259 endef
261 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
263 define gb_LinkTarget__use_mariadb-connector-c
264 $(call gb_LinkTarget_set_include,$(1),\
265 $$(INCLUDE) \
266 $(MARIADB_CFLAGS) \
268 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
270 endef
271 gb_ExternalProject__use_mariadb-connector-c :=
273 else # !SYSTEM_MARIADB_CONNECTOR_C
275 define gb_LinkTarget__use_mariadb-connector-c
276 $(call gb_LinkTarget_set_include,$(1),\
277 $$(INCLUDE) \
278 $(MARIADB_CFLAGS) \
280 $(call gb_LinkTarget_use_static_libraries,$(1),\
281 mariadb-connector-c \
283 ifeq ($(OS),MACOSX)
284 $(call gb_LinkTarget_add_libs,$(1),\
285 -liconv \
287 endif
289 endef
290 define gb_ExternalProject__use_mariadb-connector-c
291 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
293 endef
295 endif # SYSTEM_MARIADB_CONNECTOR_C
298 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
300 define gb_LinkTarget__use_mysql
302 $(call gb_LinkTarget_add_defs,$(1),\
303 -DSYSTEM_MARIADB \
306 $(call gb_LinkTarget_add_libs,$(1),\
307 $(MARIADB_LIBS) \
310 $(call gb_LinkTarget_set_include,$(1),\
311 $(MARIADB_CFLAGS) \
312 $$(INCLUDE) \
314 endef
316 else
318 define gb_LinkTarget__use_mysql
320 $(call gb_LinkTarget_set_include,$(1),\
321 $$(INCLUDE) \
324 endef
326 endif
328 ifneq ($(SYSTEM_ZLIB),)
330 define gb_LinkTarget__use_zlib
331 $(call gb_LinkTarget_add_defs,$(1),\
332 -DSYSTEM_ZLIB \
334 $(call gb_LinkTarget_add_libs,$(1),-lz)
336 endef
338 # nothing on system
339 define gb_LinkTarget__use_zlib_x64
341 endef
343 gb_ExternalProject__use_zlib :=
345 else # !SYSTEM_ZLIB
347 define gb_LinkTarget__use_zlib_multiarch
348 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
350 $(call gb_LinkTarget_set_include,$(1),\
351 $(ZLIB_CFLAGS) \
352 $$(INCLUDE) \
355 $(call gb_LinkTarget_use_static_libraries,$(1),\
356 $(2) \
359 endef
361 define gb_LinkTarget__use_zlib
362 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
364 endef
366 define gb_LinkTarget__use_zlib_x64
367 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
369 endef
371 define gb_ExternalProject__use_zlib
372 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
374 endef
376 endif # SYSTEM_ZLIB
379 ifneq ($(SYSTEM_LIBJPEG),)
381 define gb_LinkTarget__use_libjpeg
382 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
383 $(call gb_LinkTarget_set_ldflags,$(1),\
384 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
387 endef
389 gb_ExternalProject__use_libjpeg :=
391 else
393 define gb_LinkTarget__use_libjpeg
394 $(call gb_LinkTarget_set_include,$(1),\
395 $(LIBJPEG_CFLAGS) \
396 $$(INCLUDE) \
398 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
399 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
401 endef
403 define gb_ExternalProject__use_libjpeg
404 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
406 endef
408 endif # SYSTEM_LIBJPEG
410 ifneq ($(SYSTEM_MYTHES),)
412 define gb_LinkTarget__use_mythes
413 $(call gb_LinkTarget_set_include,$(1),\
414 $$(INCLUDE) \
415 $(MYTHES_CFLAGS) \
417 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
419 endef
421 else # !SYSTEM_MYTHES
423 define gb_LinkTarget__use_mythes
424 $(call gb_LinkTarget_set_include,$(1),\
425 -I$(call gb_UnpackedTarball_get_dir,mythes) \
426 $$(INCLUDE) \
429 ifeq ($(COM),MSC)
430 $(call gb_LinkTarget_use_static_libraries,$(1),\
431 mythes \
433 else
434 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
435 $(call gb_LinkTarget_use_external_project,$(1),mythes)
436 endif
438 endef
440 endif # SYSTEM_MYTHES
443 ifneq ($(SYSTEM_EXPAT),)
445 define gb_LinkTarget__use_expat_impl
446 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
448 $(call gb_LinkTarget_add_defs,$(1),\
449 -DSYSTEM_EXPAT \
452 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
454 endef
456 gb_ExternalProject__use_expat :=
458 else # !SYSTEM_EXPAT
460 define gb_LinkTarget__use_expat_impl
461 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
463 $(call gb_LinkTarget_set_include,$(1),\
464 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
465 $$(INCLUDE) \
468 $(call gb_LinkTarget_use_static_libraries,$(1),\
469 $(2) \
472 endef
474 define gb_ExternalProject__use_expat
475 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
477 endef
479 endif # SYSTEM_EXPAT
481 define gb_LinkTarget__use_expat
482 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
484 endef
486 define gb_LinkTarget__use_expat_x64
487 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
489 endef
491 ifneq ($(SYSTEM_HYPH),)
493 define gb_LinkTarget__use_hyphen
494 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
496 endef
498 else # !SYSTEM_HYPH
500 define gb_LinkTarget__use_hyphen
501 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
502 $(call gb_LinkTarget_set_include,$(1),\
503 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
504 $$(INCLUDE) \
507 ifeq ($(COM),MSC)
508 $(call gb_LinkTarget_use_static_libraries,$(1),\
509 hyphen \
511 else
512 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
513 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
514 endif
516 endef
518 endif # SYSTEM_HYPH
520 ifneq ($(SYSTEM_HUNSPELL),)
522 define gb_LinkTarget__use_hunspell
523 $(call gb_LinkTarget_set_include,$(1),\
524 $$(INCLUDE) \
525 $(HUNSPELL_CFLAGS) \
527 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
529 endef
531 gb_ExternalProject__use_hunspell :=
533 else # !SYSTEM_HUNSPELL
535 define gb_LinkTarget__use_hunspell
536 $(call gb_LinkTarget_add_defs,$(1),\
537 -DHUNSPELL_STATIC \
539 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
540 $(call gb_LinkTarget_set_include,$(1),\
541 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
542 $$(INCLUDE) \
545 ifeq ($(COM),MSC)
546 $(call gb_LinkTarget_use_static_libraries,$(1),\
547 hunspell \
549 else
550 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
551 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
552 endif
554 endef
556 define gb_ExternalProject__use_hunspell
557 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
559 endef
561 endif # SYSTEM_HUNSPELL
564 ifneq ($(SYSTEM_BOOST),)
566 define gb_LinkTarget__use_boost_lib
567 $(call gb_LinkTarget_set_include,$(1),\
568 $$(INCLUDE) \
569 $(BOOST_CPPFLAGS) \
572 $(call gb_LinkTarget_add_ldflags,$(1),\
573 $(BOOST_LDFLAGS) \
576 $(call gb_LinkTarget_add_libs,$(1),$(2))
578 endef
580 define gb_LinkTarget__use_boost_locale
581 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
583 endef
585 define gb_LinkTarget__use_boost_date_time
586 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
588 endef
590 define gb_LinkTarget__use_boost_filesystem
591 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
593 endef
595 gb_ExternalProject__use_boost_filesystem :=
597 define gb_LinkTarget__use_boost_iostreams
598 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
600 endef
602 gb_ExternalProject__use_boost_iostreams :=
604 define gb_LinkTarget__use_boost_system
605 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
607 endef
609 gb_ExternalProject__use_boost_system :=
611 define gb_LinkTarget__use_boost_headers
612 $(call gb_LinkTarget_set_include,$(1),\
613 $$(INCLUDE) \
614 $(BOOST_CPPFLAGS) \
617 endef
619 gb_ExternalProject__use_boost_headers:=
621 else # !SYSTEM_BOOST
623 define gb_LinkTarget__use_boost_lib
624 $(call gb_LinkTarget_add_defs,$(1),\
625 -DBOOST_ALL_NO_LIB \
628 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
630 endef
632 define gb_LinkTarget__use_boost_locale
633 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
634 $(call gb_LinkTarget_add_libs,$(1),\
635 $(if $(filter $(OS),MACOSX),-liconv) \
638 endef
640 define gb_LinkTarget__use_boost_date_time
641 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
643 endef
645 define gb_LinkTarget__use_boost_filesystem
646 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
648 endef
650 define gb_ExternalProject__use_boost_filesystem
651 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
652 endef
654 define gb_LinkTarget__use_boost_iostreams
655 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
657 endef
659 define gb_ExternalProject__use_boost_iostreams
660 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
661 endef
663 define gb_LinkTarget__use_boost_system
664 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
666 endef
668 define gb_ExternalProject__use_boost_system
669 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
670 endef
672 define gb_LinkTarget__use_boost_headers
673 $(call gb_LinkTarget_use_unpacked,$(1),boost)
674 $(call gb_LinkTarget_set_include,$(1),\
675 $(BOOST_CPPFLAGS) \
676 $$(INCLUDE) \
679 endef
681 define gb_ExternalProject__use_boost_headers
682 $(call gb_ExternalProject_use_unpacked,$(1),boost)
684 endef
686 endif # SYSTEM_BOOST
689 ifneq ($(SYSTEM_LIBCMIS),)
691 define gb_LinkTarget__use_libcmis
692 $(call gb_LinkTarget_set_include,$(1),\
693 $$(INCLUDE) \
694 $(LIBCMIS_CFLAGS) \
696 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
698 endef
700 else # !SYSTEM_LIBCMIS
702 define gb_LinkTarget__use_libcmis
703 $(call gb_LinkTarget_set_include,$(1),\
704 -I$(call gb_UnpackedTarball_get_dir,libcmis)/inc \
705 $$(INCLUDE) \
707 $(call gb_LinkTarget_use_static_libraries,$(1),\
708 libcmis \
711 endef
713 endif # SYSTEM_LIBCMIS
715 ifeq ($(ENABLE_JAVA),TRUE)
717 define gb_LinkTarget__use_jawt
718 $(call gb_LinkTarget_add_libs,$(1),\
719 $(JAWTLIB) \
722 endef
724 else # !ENABLE_JAVA
726 gb_LinkTarget__use_jawt :=
728 endif # ENABLE_JAVA
730 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
732 define gb_LinkTarget__use_libatomic_ops
733 $(call gb_LinkTarget_set_include,$(1),\
734 $$(INCLUDE) \
735 $(LIBATOMIC_OPS_CFLAGS) \
737 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
739 endef
740 gb_ExternalProject__use_libatomic_ops :=
742 else # !SYSTEM_LIBATOMIC_OPS
744 define gb_LinkTarget__use_libatomic_ops
745 $(call gb_LinkTarget_set_include,$(1),\
746 $(LIBATOMIC_OPS_CFLAGS) \
747 $$(INCLUDE) \
748 $(LIBATOMIC_OPS_CFLAGS) \
750 $(call gb_LinkTarget_use_external_project,$(1),\
751 libatomic_ops \
754 $(call gb_LinkTarget_add_libs,$(1),\
755 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
758 endef
760 define gb_ExternalProject__use_libatomic_ops
761 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
763 endef
765 endif # SYSTEM_LIBATOMIC_OPS
768 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
770 define gb_LinkTarget__use_libexttextcat
771 $(call gb_LinkTarget_set_include,$(1),\
772 $$(INCLUDE) \
773 $(LIBEXTTEXTCAT_CFLAGS) \
775 $(call gb_LinkTarget_add_defs,$(1),\
776 -DSYSTEM_LIBEXTTEXTCAT \
778 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
780 endef
782 else # !SYSTEM_LIBEXTTEXTCAT
784 define gb_LinkTarget__use_libexttextcat
785 $(call gb_LinkTarget_set_include,$(1),\
786 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
787 $$(INCLUDE) \
790 ifeq ($(COM),MSC)
791 $(call gb_LinkTarget_use_static_libraries,$(1),\
792 libexttextcat \
794 else
795 $(call gb_LinkTarget_add_libs,$(1),\
796 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
798 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
799 endif
802 endef
804 endif # SYSTEM_LIBEXTTEXTCAT
807 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
809 define gb_LinkTarget__use_libnumbertext
810 $(call gb_LinkTarget_set_include,$(1),\
811 $$(INCLUDE) \
812 $(LIBNUMBERTEXT_CFLAGS) \
814 $(call gb_LinkTarget_add_defs,$(1),\
815 -DSYSTEM_LIBNUMBERTEXT \
817 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
819 endef
821 else # !SYSTEM_LIBNUMBERTEXT
823 ifneq ($(ENABLE_LIBNUMBERTEXT),)
825 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
826 libnumbertext_numbertext \
829 define gb_LinkTarget__use_libnumbertext
830 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
831 $(call gb_LinkTarget_set_include,$(1),\
832 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
833 $$(INCLUDE) \
835 $(call gb_LinkTarget_add_defs,$(1),\
836 -DENABLE_LIBNUMBERTEXT \
839 ifeq ($(COM),MSC)
840 $(call gb_LinkTarget_use_static_libraries,$(1),\
841 libnumbertext \
843 else
845 $(call gb_LinkTarget_add_libs,$(1),\
846 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
848 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
850 endif
852 endef
854 else # !ENABLE_LIBNUMBERTEXT
856 define gb_LinkTarget__use_libnumbertext
857 endef
859 endif # ENABLE_LIBNUMBERTEXT
861 endif # SYSTEM_LIBNUMBERTEXT
864 ifneq ($(SYSTEM_LIBXML),)
866 define gb_LinkTarget__use_libxml2
867 $(call gb_LinkTarget_add_defs,$(1),\
868 -DSYSTEM_LIBXML \
870 $(call gb_LinkTarget_set_include,$(1),\
871 $$(INCLUDE) \
872 $(LIBXML_CFLAGS) \
874 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
876 endef
877 gb_ExternalProject__use_libxml2:=
879 else # !SYSTEM_LIBXML
881 $(eval $(call gb_Helper_register_packages_for_install,ure,\
882 libxml2 \
885 define gb_LinkTarget__use_libxml2
886 $(call gb_LinkTarget_use_package,$(1),libxml2)
887 $(call gb_LinkTarget_set_include,$(1),\
888 $$(INCLUDE) \
889 $(LIBXML_CFLAGS) \
892 $(call gb_LinkTarget_add_libs,$(1),\
893 $(LIBXML_LIBS) \
896 ifeq ($(COM),MSC)
897 $(call gb_LinkTarget_use_external,$(1),icu_headers)
898 endif
900 endef
901 define gb_ExternalProject__use_libxml2
902 $(call gb_ExternalProject_use_package,$(1),libxml2)
904 ifeq ($(COM),MSC)
905 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
906 endif
908 endef
910 endif # SYSTEM_LIBXML
913 ifneq ($(SYSTEM_LIBXSLT),)
915 define gb_LinkTarget__use_libxslt
916 $(call gb_LinkTarget_set_include,$(1),\
917 $$(INCLUDE) \
918 $(LIBXSLT_CFLAGS) \
920 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
922 endef
924 define gb_LinkTarget__use_libexslt
925 $(call gb_LinkTarget_set_include,$(1),\
926 $$(INCLUDE) \
927 $(LIBEXSLT_CFLAGS) \
930 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
932 endef
934 else # !SYSTEM_LIBXSLT
936 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
937 libxslt \
940 define gb_LinkTarget__use_libxslt
941 $(call gb_LinkTarget_use_package,$(1),libxslt)
942 $(call gb_LinkTarget_set_include,$(1),\
943 $$(INCLUDE) \
944 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
947 ifeq ($(COM),MSC)
948 $(call gb_LinkTarget_add_libs,$(1),\
949 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
951 else
952 $(call gb_LinkTarget_add_libs,$(1),\
953 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
955 endif
957 endef
959 define gb_LinkTarget__use_libexslt
960 $(call gb_LinkTarget_use_package,$(1),libxslt)
961 $(call gb_LinkTarget_set_include,$(1),\
962 $$(INCLUDE) \
963 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
966 ifeq ($(COM),MSC)
967 $(call gb_LinkTarget_add_libs,$(1),\
968 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
970 else
971 $(call gb_LinkTarget_add_libs,$(1),\
972 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
974 endif
976 endef
978 endif # SYSTEM_LIBXSLT
981 ifneq ($(SYSTEM_XMLSEC),)
983 define gb_LinkTarget__use_xmlsec
984 $(call gb_LinkTarget_add_defs,$(1),\
985 -DSYSTEM_XMLSEC \
987 $(call gb_LinkTarget_set_include,$(1),\
988 $$(INCLUDE) \
989 $(XMLSEC_CFLAGS) \
991 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
993 endef
995 gb_ExternalProject__use_xmlsec:=
997 else # !SYSTEM_XMLSEC
999 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1000 xmlsec \
1003 define gb_LinkTarget__use_xmlsec
1005 endef
1007 endif # SYSTEM_XMLSEC
1009 ifneq ($(SYSTEM_LIBLANGTAG),)
1011 define gb_LinkTarget__use_liblangtag
1012 $(call gb_LinkTarget_set_include,$(1),\
1013 $$(INCLUDE) \
1014 $(LIBLANGTAG_CFLAGS) \
1017 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1019 endef
1021 gb_ExternalProject__use_liblangtag :=
1023 else # !SYSTEM_LIBLANGTAG
1025 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1026 liblangtag_data \
1029 ifeq ($(COM),MSC)
1031 define gb_LinkTarget__use_liblangtag
1032 $(call gb_LinkTarget_set_include,$(1),\
1033 $(LIBLANGTAG_CFLAGS) \
1034 $$(INCLUDE) \
1036 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1037 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1039 endef
1041 else
1043 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1044 liblangtag \
1047 define gb_LinkTarget__use_liblangtag
1048 $(call gb_LinkTarget_set_include,$(1),\
1049 $(LIBLANGTAG_CFLAGS) \
1050 $$(INCLUDE) \
1052 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1053 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1055 endef
1057 endif # MSC
1059 define gb_ExternalProject__use_liblangtag
1060 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1062 endef
1064 endif # SYSTEM_LIBLANGTAG
1067 gb_ExternalProject__use_apr :=
1069 ifeq ($(WITH_WEBDAV),serf)
1071 define gb_LinkTarget__use_apr
1072 $(call gb_LinkTarget_set_include,$(1),\
1073 $$(INCLUDE) \
1074 $(APR_CFLAGS) \
1076 $(call gb_LinkTarget_add_libs,$(1),\
1077 $(APR_LIBS) \
1078 $(if $(filter $(OS),LINUX),-lpthread) \
1079 $(if $(filter $(OS),MACOSX),-liconv) \
1082 ifeq ($(SYSTEM_APR),)
1083 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1084 mswsock \
1085 rpcrt4 \
1086 shell32 \
1088 $(call gb_LinkTarget_add_defs,$(1),\
1089 -DAPR_DECLARE_STATIC \
1090 -DAPU_DECLARE_STATIC \
1092 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1093 endif
1095 endef
1097 define gb_ExternalProject__use_apr
1098 ifeq ($(SYSTEM_APR),)
1099 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1100 endif
1102 endef
1104 define gb_LinkTarget__use_serf
1105 $(call gb_LinkTarget_set_include,$(1),\
1106 $(SERF_CFLAGS) \
1107 $$(INCLUDE) \
1109 $(call gb_LinkTarget_add_libs,$(1),\
1110 $(SERF_LIBS) \
1113 ifeq ($(SYSTEM_SERF),)
1114 $(call gb_LinkTarget_use_external_project,$(1),serf)
1115 endif
1117 endef
1119 else ifeq ($(WITH_WEBDAV),neon)
1121 ifneq ($(SYSTEM_NEON),)
1123 define gb_LinkTarget__use_neon
1124 $(call gb_LinkTarget_add_defs,$(1),\
1125 -DNEON_VERSION=0x$(NEON_VERSION) \
1126 -DSYSTEM_NEON \
1128 $(call gb_LinkTarget_set_include,$(1),\
1129 $$(INCLUDE) \
1130 $(NEON_CFLAGS) \
1133 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1135 endef
1137 else # !SYSTEM_NEON
1139 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1140 neon \
1143 define gb_LinkTarget__use_neon
1144 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1145 $(call gb_LinkTarget_set_include,$(1),\
1146 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1147 $$(INCLUDE) \
1149 $(call gb_LinkTarget_use_libraries,$(1),\
1150 neon \
1153 endef
1155 endif # SYSTEM_NEON
1157 endif # WITH_WEBDAV
1159 ifneq ($(SYSTEM_REDLAND),)
1161 define gb_LinkTarget__use_librdf
1162 $(call gb_LinkTarget_add_defs,$(1),\
1163 -DSYSTEM_REDLAND \
1165 $(call gb_LinkTarget_set_include,$(1),\
1166 $$(INCLUDE) \
1167 $(REDLAND_CFLAGS) \
1169 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1171 endef
1173 gb_LinkTarget__use_redland_headers:=
1175 gb_LinkTarget__use_raptor_headers:=
1177 gb_LinkTarget__use_rasqal_headers:=
1179 else # !SYSTEM_REDLAND
1181 define gb_LinkTarget__use_redland_headers
1182 $(call gb_LinkTarget_set_include,$(1),\
1183 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1184 $$(INCLUDE) \
1187 endef
1189 define gb_LinkTarget__use_raptor_headers
1190 $(call gb_LinkTarget_set_include,$(1),\
1191 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1192 $$(INCLUDE) \
1195 endef
1197 define gb_LinkTarget__use_rasqal_headers
1198 $(call gb_LinkTarget_set_include,$(1),\
1199 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1200 $$(INCLUDE) \
1203 endef
1205 ifneq ($(OS),ANDROID)
1207 ifeq ($(COM),MSC)
1208 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1209 raptor2 \
1210 rasqal \
1211 rdf \
1213 else
1214 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1215 raptor \
1216 rasqal \
1217 redland \
1219 endif
1221 define gb_LinkTarget__use_librdf
1222 ifeq ($(COM),MSC)
1223 $(call gb_LinkTarget_use_libraries,$(1),\
1224 raptor2 \
1225 rdf \
1227 else
1228 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1230 $(call gb_LinkTarget_add_libs,$(1),\
1231 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1232 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1233 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1235 endif
1237 endef
1239 else # ANDROID
1241 define gb_LinkTarget__use_librdf
1242 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1244 endef
1246 endif # ANDROID
1248 endif # SYSTEM_REDLAND
1251 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(DISABLE_GUI),) # or
1253 ifneq ($(SYSTEM_CAIRO),)
1255 define gb_LinkTarget__use_cairo
1256 $(call gb_LinkTarget_set_include,$(1),\
1257 $$(INCLUDE) \
1258 $(CAIRO_CFLAGS) \
1260 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1261 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1263 endef
1265 else # !SYSTEM_CAIRO
1267 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1268 cairo \
1269 $(if $(filter $(OS),WNT),,pixman) \
1272 define gb_LinkTarget__use_cairo
1273 $(call gb_LinkTarget_use_package,$(1),cairo)
1274 $(call gb_LinkTarget_use_package,$(1),pixman)
1275 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1276 $(call gb_LinkTarget_set_include,$(1),\
1277 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1278 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1279 $$(INCLUDE) \
1281 $(call gb_LinkTarget_add_libs,$(1),\
1282 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1283 $(if $(filter-out MACOSX WNT,$(OS)), \
1284 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1288 endef
1290 endif # SYSTEM_CAIRO
1292 else ifeq ($(OS),ANDROID)
1294 define gb_LinkTarget__use_cairo
1295 $(call gb_LinkTarget_use_package,$(1),cairo)
1296 $(call gb_LinkTarget_use_package,$(1),pixman)
1297 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1298 $(call gb_LinkTarget_set_include,$(1),\
1299 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1300 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1301 $$(INCLUDE) \
1303 $(call gb_LinkTarget_add_libs,$(1),\
1304 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1305 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1308 endef
1310 endif # CAIRO
1312 ifneq ($(SYSTEM_FREETYPE),)
1314 define gb_LinkTarget__use_freetype_headers
1315 $(call gb_LinkTarget_set_include,$(1),\
1316 $$(INCLUDE) \
1317 $(FREETYPE_CFLAGS) \
1320 endef
1322 gb_ExternalProject__use_freetype :=
1324 else
1326 define gb_LinkTarget__use_freetype_headers
1327 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1328 $(call gb_LinkTarget_set_include,$(1),\
1329 $(FREETYPE_CFLAGS) \
1330 $$(INCLUDE) \
1333 endef
1335 define gb_ExternalProject__use_freetype
1336 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1338 endef
1340 endif # SYSTEM_FREETYPE
1342 define gb_LinkTarget__use_freetype
1343 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1344 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1346 endef
1348 ifneq ($(SYSTEM_FONTCONFIG),)
1350 define gb_LinkTarget__use_fontconfig
1351 $(call gb_LinkTarget_set_include,$(1),\
1352 $$(INCLUDE) \
1353 $(FONTCONFIG_CFLAGS) \
1356 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1358 endef
1360 else
1362 define gb_LinkTarget__use_fontconfig
1363 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1364 $(call gb_LinkTarget_set_include,$(1),\
1365 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1366 $$(INCLUDE) \
1369 $(call gb_LinkTarget_add_libs,$(1),\
1370 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1373 endef
1375 endif # SYSTEM_FONTCONFIG
1377 ifneq ($(SYSTEM_GRAPHITE),)
1379 define gb_LinkTarget__use_graphite
1380 $(call gb_LinkTarget_set_include,$(1),\
1381 $$(INCLUDE) \
1382 $(GRAPHITE_CFLAGS) \
1384 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1386 endef
1388 gb_ExternalProject__use_graphite:=
1390 else # !SYSTEM_GRAPHITE
1392 define gb_LinkTarget__use_graphite
1393 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1394 $(call gb_LinkTarget_set_include,$(1),\
1395 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1396 $$(INCLUDE) \
1398 $(call gb_LinkTarget_use_static_libraries,$(1),\
1399 graphite \
1402 endef
1404 define gb_ExternalProject__use_graphite
1405 $(call gb_ExternalProject_use_static_libraries,$(1),\
1406 graphite \
1409 endef
1410 endif # SYSTEM_GRAPHITE
1412 ifneq ($(SYSTEM_ICU),)
1414 gb_LinkTarget__use_icu_headers:=
1415 gb_ExternalProject__use_icu:=
1417 define gb_LinkTarget__use_icudata
1418 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1420 endef
1421 define gb_LinkTarget__use_icui18n
1422 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1424 endef
1425 define gb_LinkTarget__use_icuuc
1426 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1428 endef
1430 else # !SYSTEM_ICU
1432 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1433 icu_ure \
1436 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1437 icu \
1440 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1441 gb_ICU_suffix:=lo
1442 else
1443 gb_ICU_suffix:=
1444 endif
1446 define gb_LinkTarget__use_icu_headers
1447 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1448 $(call gb_LinkTarget_set_include,$(1),\
1449 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1450 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1451 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1452 $$(INCLUDE) \
1455 endef
1457 define gb_ExternalProject__use_icu
1458 $(call gb_ExternalProject_use_package,$(1),icu)
1460 endef
1462 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1463 define gb_LinkTarget__use_icudata
1464 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1466 ifeq ($(OS),WNT)
1467 $(call gb_LinkTarget_add_libs,$(1),\
1468 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1470 else
1471 $(call gb_LinkTarget_add_libs,$(1),\
1472 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1474 endif
1476 endef
1478 define gb_LinkTarget__use_icui18n
1479 $(call gb_LinkTarget_use_package,$(1),icu)
1481 ifeq ($(OS),WNT)
1482 $(call gb_LinkTarget_add_libs,$(1),\
1483 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1485 else
1486 $(call gb_LinkTarget_add_libs,$(1),\
1487 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1489 endif
1491 endef
1493 define gb_LinkTarget__use_icuuc
1494 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1496 ifeq ($(OS),WNT)
1497 $(call gb_LinkTarget_add_libs,$(1),\
1498 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1500 else
1501 $(call gb_LinkTarget_add_libs,$(1),\
1502 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1504 endif
1506 endef
1508 endif # SYSTEM_ICU
1510 ifneq ($(SYSTEM_HARFBUZZ),)
1512 define gb_LinkTarget__use_harfbuzz
1513 $(call gb_LinkTarget_set_include,$(1),\
1514 $$(INCLUDE) \
1515 $(HARFBUZZ_CFLAGS) \
1517 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1519 endef
1521 gb_ExternalProject__use_harfbuzz :=
1523 else # SYSTEM_HARFBUZZ != TRUE
1525 define gb_LinkTarget__use_harfbuzz
1526 $(call gb_LinkTarget_set_include,$(1),\
1527 $(HARFBUZZ_CFLAGS) \
1528 $$(INCLUDE) \
1530 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1531 $(call gb_LinkTarget_use_external,$(1),icuuc)
1532 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1534 endef
1536 define gb_ExternalProject__use_harfbuzz
1537 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1539 endef
1541 endif # SYSTEM_HARFBUZZ
1543 ifeq ($(DISABLE_OPENSSL),TRUE)
1545 gb_ExternalProject__use_openssl:=
1546 gb_LinkTarget__use_openssl_headers:=
1547 gb_LinkTarget__use_openssl:=
1549 else # !DISABLE_OPENSSL
1551 ifneq ($(SYSTEM_OPENSSL),)
1553 gb_LinkTarget__use_openssl_headers:=
1554 gb_ExternalProject__use_openssl:=
1556 define gb_LinkTarget__use_openssl
1557 $(call gb_LinkTarget_set_include,$(1),\
1558 $$(INCLUDE) \
1559 $(OPENSSL_CFLAGS) \
1561 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1563 endef
1565 else # !SYSTEM_OPENSSL
1567 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1568 openssl \
1571 define gb_ExternalProject__use_openssl
1572 $(call gb_ExternalProject_use_package,$(1),openssl)
1574 endef
1576 define gb_LinkTarget__use_openssl_headers
1577 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1578 $(call gb_LinkTarget_set_include,$(1),\
1579 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1580 $$(INCLUDE) \
1583 endef
1585 define gb_LinkTarget__use_openssl
1586 $(call gb_LinkTarget_use_package,$(1),openssl)
1587 ifeq ($(OS),WNT)
1588 $(call gb_LinkTarget_add_libs,$(1),\
1589 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1590 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1592 else
1593 $(call gb_LinkTarget_add_libs,$(1),\
1594 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1595 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1597 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1598 ifeq ($(OS),SOLARIS)
1599 $(call gb_LinkTarget_add_libs,$(1),\
1600 -lnsl \
1601 -lsocket \
1603 endif
1604 endif
1606 endef
1608 endif # SYSTEM_OPENSSL
1609 endif # DISABLE_OPENSSL
1612 ifeq ($(DISABLE_OPENSSL),TRUE)
1614 define gb_LinkTarget__use_gnutls
1615 $(call gb_LinkTarget_set_include,$(1),\
1616 $$(INCLUDE) \
1617 $(GNUTLS_CFLAGS) \
1620 $(call gb_LinkTarget_add_defs,$(1),\
1621 -DDISABLE_OPENSSL \
1624 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1626 endef
1628 define gb_LinkTarget__use_libgcrypt
1629 $(call gb_LinkTarget_set_include,$(1),\
1630 $$(INCLUDE) \
1631 $(LIBGCRYPT_CFLAGS) \
1634 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1636 endef
1638 else # !DISABLE_OPENSSL
1640 gb_LinkTarget__use_gnutls:=
1641 gb_LinkTarget__use_libgcrypt:=
1643 endif # DISABLE_OPENSSL
1646 ifneq ($(SYSTEM_CDR),)
1648 define gb_LinkTarget__use_cdr
1649 $(call gb_LinkTarget_set_include,$(1),\
1650 $$(INCLUDE) \
1651 $(CDR_CFLAGS) \
1653 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1655 endef
1657 else # !SYSTEM_CDR
1659 define gb_LinkTarget__use_cdr
1660 $(call gb_LinkTarget_set_include,$(1),\
1661 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1662 $$(INCLUDE) \
1664 $(call gb_LinkTarget_add_libs,$(1),\
1665 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1667 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1668 endef
1670 endif # SYSTEM_CDR
1673 ifneq ($(SYSTEM_EBOOK),)
1675 define gb_LinkTarget__use_ebook
1676 $(call gb_LinkTarget_set_include,$(1),\
1677 $$(INCLUDE) \
1678 $(EBOOK_CFLAGS) \
1680 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1682 endef
1684 gb_ExternalProject__use_ebook :=
1686 else # !SYSTEM_EBOOK
1688 define gb_LinkTarget__use_ebook
1689 $(call gb_LinkTarget_set_include,$(1),\
1690 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1691 $$(INCLUDE) \
1693 $(call gb_LinkTarget_add_libs,$(1),\
1694 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1696 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1698 endef
1700 define gb_ExternalProject__use_ebook
1701 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1703 endef
1705 endif # SYSTEM_EBOOK
1708 ifneq ($(SYSTEM_ETONYEK),)
1710 define gb_LinkTarget__use_etonyek
1711 $(call gb_LinkTarget_set_include,$(1),\
1712 $$(INCLUDE) \
1713 $(ETONYEK_CFLAGS) \
1715 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1717 endef
1719 gb_ExternalProject__use_etonyek :=
1721 else # !SYSTEM_ETONYEK
1723 ifeq ($(COM),MSC)
1725 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1726 etonyek \
1729 define gb_LinkTarget__use_etonyek
1730 $(call gb_LinkTarget_set_include,$(1),\
1731 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1732 $$(INCLUDE) \
1734 $(call gb_LinkTarget_use_libraries,$(1),\
1735 etonyek \
1738 endef
1740 else # !MSC
1742 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1743 libetonyek \
1746 define gb_LinkTarget__use_etonyek
1747 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1749 $(call gb_LinkTarget_set_include,$(1),\
1750 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1751 -DLIBETONYEK_VISIBILITY \
1752 $$(INCLUDE) \
1754 $(call gb_LinkTarget_add_libs,$(1),\
1755 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1757 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1759 endef
1761 define gb_ExternalProject__use_etonyek
1762 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1764 endef
1766 endif
1768 endif # SYSTEM_ETONYEK
1771 ifneq ($(SYSTEM_FREEHAND),)
1773 define gb_LinkTarget__use_freehand
1774 $(call gb_LinkTarget_set_include,$(1),\
1775 $$(INCLUDE) \
1776 $(FREEHAND_CFLAGS) \
1778 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1780 endef
1782 gb_ExternalProject__use_freehand :=
1784 else # !SYSTEM_FREEHAND
1786 define gb_LinkTarget__use_freehand
1787 $(call gb_LinkTarget_set_include,$(1),\
1788 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1789 $$(INCLUDE) \
1791 $(call gb_LinkTarget_add_libs,$(1),\
1792 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1794 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1796 endef
1798 define gb_ExternalProject__use_freehand
1799 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1801 endef
1803 endif # SYSTEM_FREEHAND
1806 ifneq ($(SYSTEM_ODFGEN),)
1808 define gb_LinkTarget__use_odfgen
1809 $(call gb_LinkTarget_set_include,$(1),\
1810 $$(INCLUDE) \
1811 $(ODFGEN_CFLAGS) \
1813 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1815 endef
1817 else # !SYSTEM_ODFGEN
1819 ifeq ($(COM),MSC)
1821 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1822 odfgen \
1825 define gb_LinkTarget__use_odfgen
1826 $(call gb_LinkTarget_set_include,$(1),\
1827 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1828 $$(INCLUDE) \
1830 $(call gb_LinkTarget_use_libraries,$(1),\
1831 odfgen \
1834 endef
1836 else # !MSC
1838 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1839 libodfgen \
1842 define gb_LinkTarget__use_odfgen
1843 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1845 $(call gb_LinkTarget_set_include,$(1),\
1846 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1847 -DLIBODFGEN_VISIBILITY \
1848 $$(INCLUDE) \
1850 $(call gb_LinkTarget_add_libs,$(1),\
1851 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1854 endef
1856 endif
1858 endif # SYSTEM_ODFGEN
1860 ifneq ($(SYSTEM_EPUBGEN),)
1862 define gb_LinkTarget__use_epubgen
1863 $(call gb_LinkTarget_set_include,$(1),\
1864 $$(INCLUDE) \
1865 $(EPUBGEN_CFLAGS) \
1867 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1869 endef
1870 gb_ExternalProject__use_epubgen :=
1872 else # !SYSTEM_EPUBGEN
1874 define gb_LinkTarget__use_epubgen
1875 $(call gb_LinkTarget_set_include,$(1),\
1876 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1877 $$(INCLUDE) \
1879 $(call gb_LinkTarget_add_libs,$(1),\
1880 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1882 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1884 endef
1885 define gb_ExternalProject__use_epubgen
1886 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1888 endef
1890 endif # SYSTEM_EPUBGEN
1892 ifneq ($(SYSTEM_REVENGE),)
1894 define gb_LinkTarget__use_revenge
1895 $(call gb_LinkTarget_set_include,$(1),\
1896 $$(INCLUDE) \
1897 $(REVENGE_CFLAGS) \
1899 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1901 endef
1903 gb_ExternalProject__use_revenge :=
1905 else # !SYSTEM_REVENGE
1907 ifeq ($(COM),MSC)
1909 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1910 revenge \
1913 define gb_LinkTarget__use_revenge
1914 $(call gb_LinkTarget_set_include,$(1),\
1915 $(REVENGE_CFLAGS) \
1916 $$(INCLUDE) \
1918 $(call gb_LinkTarget_use_libraries,$(1),\
1919 revenge \
1922 endef
1924 define gb_ExternalProject__use_revenge
1925 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1927 endef
1929 else # !MSC
1931 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1932 librevenge \
1935 define gb_LinkTarget__use_revenge
1936 $(call gb_LinkTarget_use_package,$(1),librevenge)
1938 $(call gb_LinkTarget_set_include,$(1),\
1939 $(REVENGE_CFLAGS) \
1940 -DLIBREVENGE_VISIBILITY \
1941 $$(INCLUDE) \
1943 $(call gb_LinkTarget_add_libs,$(1),\
1944 $(REVENGE_LIBS) \
1946 endef
1948 define gb_ExternalProject__use_revenge
1949 $(call gb_ExternalProject_use_package,$(1),librevenge)
1951 endef
1953 endif # MSC
1955 endif # SYSTEM_REVENGE
1958 ifneq ($(SYSTEM_ABW),)
1960 define gb_LinkTarget__use_abw
1961 $(call gb_LinkTarget_set_include,$(1),\
1962 $$(INCLUDE) \
1963 $(ABW_CFLAGS) \
1965 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1967 endef
1968 gb_ExternalProject__use_abw :=
1970 else # !SYSTEM_ABW
1972 define gb_LinkTarget__use_abw
1973 $(call gb_LinkTarget_set_include,$(1),\
1974 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1975 $$(INCLUDE) \
1977 $(call gb_LinkTarget_add_libs,$(1),\
1978 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1980 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1982 endef
1983 define gb_ExternalProject__use_abw
1984 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1986 endef
1988 endif # SYSTEM_ABW
1991 ifneq ($(SYSTEM_MSPUB),)
1993 define gb_LinkTarget__use_mspub
1994 $(call gb_LinkTarget_set_include,$(1),\
1995 $$(INCLUDE) \
1996 $(MSPUB_CFLAGS) \
1998 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2000 endef
2002 else # !SYSTEM_MSPUB
2004 define gb_LinkTarget__use_mspub
2005 $(call gb_LinkTarget_set_include,$(1),\
2006 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2007 $$(INCLUDE) \
2009 $(call gb_LinkTarget_add_libs,$(1),\
2010 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2012 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2014 endef
2016 endif # SYSTEM_MSPUB
2019 ifneq ($(SYSTEM_PAGEMAKER),)
2021 define gb_LinkTarget__use_pagemaker
2022 $(call gb_LinkTarget_set_include,$(1),\
2023 $$(INCLUDE) \
2024 $(PAGEMAKER_CFLAGS) \
2026 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2028 endef
2029 gb_ExternalProject__use_pagemaker :=
2031 else # !SYSTEM_PAGEMAKER
2033 define gb_LinkTarget__use_pagemaker
2034 $(call gb_LinkTarget_set_include,$(1),\
2035 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2036 $$(INCLUDE) \
2038 $(call gb_LinkTarget_add_libs,$(1),\
2039 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2041 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2043 endef
2044 define gb_ExternalProject__use_pagemaker
2045 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2047 endef
2049 endif # SYSTEM_PAGEMAKER
2052 ifneq ($(SYSTEM_QXP),)
2054 define gb_LinkTarget__use_qxp
2055 $(call gb_LinkTarget_set_include,$(1),\
2056 $$(INCLUDE) \
2057 $(QXP_CFLAGS) \
2059 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2061 endef
2062 gb_ExternalProject__use_qxp :=
2064 else # !SYSTEM_QXP
2066 define gb_LinkTarget__use_qxp
2067 $(call gb_LinkTarget_set_include,$(1),\
2068 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2069 $$(INCLUDE) \
2071 $(call gb_LinkTarget_add_libs,$(1),\
2072 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2074 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2076 endef
2077 define gb_ExternalProject__use_qxp
2078 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2080 endef
2082 endif # SYSTEM_QXP
2085 ifneq ($(SYSTEM_ZMF),)
2087 define gb_LinkTarget__use_zmf
2088 $(call gb_LinkTarget_set_include,$(1),\
2089 $$(INCLUDE) \
2090 $(ZMF_CFLAGS) \
2092 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2094 endef
2095 gb_ExternalProject__use_zmf :=
2097 else # !SYSTEM_ZMF
2099 define gb_LinkTarget__use_zmf
2100 $(call gb_LinkTarget_set_include,$(1),\
2101 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2102 $$(INCLUDE) \
2104 $(call gb_LinkTarget_add_libs,$(1),\
2105 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2107 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2109 endef
2110 define gb_ExternalProject__use_zmf
2111 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2113 endef
2115 endif # SYSTEM_ZMF
2118 ifneq ($(SYSTEM_VISIO),)
2120 define gb_LinkTarget__use_visio
2121 $(call gb_LinkTarget_set_include,$(1),\
2122 $$(INCLUDE) \
2123 $(VISIO_CFLAGS) \
2125 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2127 endef
2129 else # !SYSTEM_VISIO
2131 define gb_LinkTarget__use_visio
2132 $(call gb_LinkTarget_set_include,$(1),\
2133 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2134 $$(INCLUDE) \
2136 $(call gb_LinkTarget_add_libs,$(1),\
2137 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2139 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2141 endef
2143 endif # SYSTEM_VISIO
2146 ifneq ($(SYSTEM_WPD),)
2148 define gb_LinkTarget__use_wpd
2149 $(call gb_LinkTarget_set_include,$(1),\
2150 $$(INCLUDE) \
2151 $(WPD_CFLAGS) \
2153 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2155 endef
2156 gb_ExternalProject__use_wpd :=
2158 else # !SYSTEM_WPD
2160 ifeq ($(COM),MSC)
2162 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2163 wpd \
2166 define gb_LinkTarget__use_wpd
2167 $(call gb_LinkTarget_set_include,$(1),\
2168 $(WPD_CFLAGS) \
2169 $$(INCLUDE) \
2171 $(call gb_LinkTarget_use_libraries,$(1),\
2172 wpd \
2175 endef
2177 define gb_ExternalProject__use_wpd
2178 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2180 endef
2182 else # !MSC
2184 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2185 libwpd \
2188 define gb_LinkTarget__use_wpd
2189 $(call gb_LinkTarget_use_package,$(1),libwpd)
2191 $(call gb_LinkTarget_set_include,$(1),\
2192 $(WPD_CFLAGS) \
2193 $$(INCLUDE) \
2195 $(call gb_LinkTarget_add_libs,$(1),\
2196 $(WPD_LIBS) \
2199 endef
2201 define gb_ExternalProject__use_wpd
2202 $(call gb_ExternalProject_use_package,$(1),libwpd)
2204 endef
2206 endif # MSC
2208 endif # SYSTEM_WPD
2211 ifneq ($(SYSTEM_WPG),)
2213 define gb_LinkTarget__use_wpg
2214 $(call gb_LinkTarget_set_include,$(1),\
2215 $$(INCLUDE) \
2216 $(WPG_CFLAGS) \
2218 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2220 endef
2221 gb_ExternalProject__use_wpg :=
2223 else # !SYSTEM_WPG
2225 ifeq ($(COM),MSC)
2227 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2228 wpg \
2231 define gb_LinkTarget__use_wpg
2232 $(call gb_LinkTarget_set_include,$(1),\
2233 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2234 $$(INCLUDE) \
2236 $(call gb_LinkTarget_use_libraries,$(1),\
2237 wpg \
2240 endef
2242 else # !MSC
2244 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2245 libwpg \
2248 define gb_LinkTarget__use_wpg
2249 $(call gb_LinkTarget_use_package,$(1),libwpg)
2251 $(call gb_LinkTarget_set_include,$(1),\
2252 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2253 $$(INCLUDE) \
2255 $(call gb_LinkTarget_add_libs,$(1),\
2256 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2259 endef
2261 endif # MSC
2263 endif # SYSTEM_WPG
2266 ifneq ($(SYSTEM_WPS),)
2268 define gb_LinkTarget__use_wps
2269 $(call gb_LinkTarget_set_include,$(1),\
2270 $$(INCLUDE) \
2271 $(WPS_CFLAGS) \
2273 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2275 endef
2276 gb_ExternalProject__use_wps :=
2278 else # !SYSTEM_WPS
2280 ifeq ($(COM),MSC)
2282 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2283 wps \
2286 define gb_LinkTarget__use_wps
2287 $(call gb_LinkTarget_set_include,$(1),\
2288 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2289 $$(INCLUDE) \
2292 $(call gb_LinkTarget_use_libraries,$(1),\
2293 wps \
2296 endef
2298 else # !MSC
2300 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2301 libwps \
2304 define gb_LinkTarget__use_wps
2305 $(call gb_LinkTarget_use_package,$(1),libwps)
2307 $(call gb_LinkTarget_set_include,$(1),\
2308 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2309 $$(INCLUDE) \
2311 $(call gb_LinkTarget_add_libs,$(1),\
2312 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2315 endef
2317 endif # MSC
2319 endif # SYSTEM_WPS
2322 ifneq ($(SYSTEM_MWAW),)
2324 define gb_LinkTarget__use_mwaw
2325 $(call gb_LinkTarget_set_include,$(1),\
2326 $$(INCLUDE) \
2327 $(MWAW_CFLAGS) \
2329 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2331 endef
2333 else # !SYSTEM_MWAW
2335 ifeq ($(COM),MSC)
2337 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2338 mwaw \
2341 define gb_LinkTarget__use_mwaw
2342 $(call gb_LinkTarget_set_include,$(1),\
2343 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2344 $$(INCLUDE) \
2347 $(call gb_LinkTarget_use_libraries,$(1),\
2348 mwaw \
2351 endef
2353 else # !MSC
2355 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2356 libmwaw \
2359 define gb_LinkTarget__use_mwaw
2360 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2362 $(call gb_LinkTarget_set_include,$(1),\
2363 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2364 $$(INCLUDE) \
2366 $(call gb_LinkTarget_add_libs,$(1),\
2367 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2370 endef
2372 endif # MSC
2374 endif # SYSTEM_MWAW
2376 ifneq ($(SYSTEM_STAROFFICE),)
2378 define gb_LinkTarget__use_staroffice
2379 $(call gb_LinkTarget_set_include,$(1),\
2380 $$(INCLUDE) \
2381 $(STAROFFICE_CFLAGS) \
2383 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2385 endef
2387 else # !SYSTEM_STAROFFICE
2389 ifeq ($(COM),MSC)
2391 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2392 staroffice \
2395 define gb_LinkTarget__use_staroffice
2396 $(call gb_LinkTarget_set_include,$(1),\
2397 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2398 $$(INCLUDE) \
2401 $(call gb_LinkTarget_use_libraries,$(1),\
2402 staroffice \
2405 endef
2407 else # !MSC
2409 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2410 libstaroffice \
2413 define gb_LinkTarget__use_staroffice
2414 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2416 $(call gb_LinkTarget_set_include,$(1),\
2417 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2418 $$(INCLUDE) \
2420 $(call gb_LinkTarget_add_libs,$(1),\
2421 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2424 endef
2426 endif # MSC
2428 endif # SYSTEM_STAROFFICE
2431 ifneq ($(SYSTEM_LCMS2),)
2433 define gb_LinkTarget__use_lcms2
2434 $(call gb_LinkTarget_set_include,$(1),\
2435 $$(INCLUDE) \
2436 $(LCMS2_CFLAGS) \
2438 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2440 endef
2442 gb_ExternalProject__use_lcms2 :=
2444 else # !SYSTEM_LCMS2
2446 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2447 lcms2 \
2450 define gb_ExternalProject__use_lcms2
2451 $(call gb_ExternalProject_use_package,$(1),lcms2)
2453 endef
2455 ifeq ($(OS),ANDROID)
2457 define gb_LinkTarget__use_lcms2
2458 $(call gb_LinkTarget_use_package,$(1),lcms2)
2459 $(call gb_LinkTarget_set_include,$(1),\
2460 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2461 $$(INCLUDE) \
2464 endef
2466 else
2468 define gb_LinkTarget__use_lcms2
2469 $(call gb_LinkTarget_use_package,$(1),lcms2)
2470 $(call gb_LinkTarget_set_include,$(1),\
2471 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2472 $$(INCLUDE) \
2474 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2476 endef
2478 endif # ANDROID
2479 endif # SYSTEM_LCMS2
2481 ifneq ($(ENABLE_LPSOLVE),)
2483 ifneq ($(SYSTEM_LPSOLVE),)
2485 define gb_LinkTarget__use_lpsolve
2486 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2487 $(call gb_LinkTarget_add_defs,$(1),\
2488 -DSYSTEM_LPSOLVE \
2491 endef
2493 else # !SYSTEM_LPSOLVE
2495 define gb_LinkTarget__use_lpsolve
2496 $(call gb_LinkTarget_use_package,$(1),lpsolve)
2497 ifeq ($(COM),MSC)
2498 $(call gb_LinkTarget_add_libs,$(1),\
2499 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2501 else
2502 $(call gb_LinkTarget_add_libs,$(1),\
2503 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2505 endif
2506 $(call gb_LinkTarget_set_include,$(1),\
2507 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2508 $$(INCLUDE) \
2511 endef
2513 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2514 lpsolve \
2517 endif # SYSTEM_LPSOLVE
2519 else
2521 gb_LinkTarget__use_lpsolve :=
2523 endif # ENABLE_LPSOLVE
2525 ifneq ($(ENABLE_COINMP),)
2527 ifneq ($(SYSTEM_COINMP),TRUE)
2529 define gb_LinkTarget__use_coinmp
2530 $(call gb_LinkTarget_use_package,$(1),coinmp)
2531 ifeq ($(COM),MSC)
2532 $(call gb_LinkTarget_add_libs,$(1),\
2533 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2535 else
2536 $(call gb_LinkTarget_add_libs,$(1),\
2537 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2538 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2539 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2540 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2541 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2542 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2543 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2545 endif
2546 $(call gb_LinkTarget_set_include,$(1),\
2547 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2548 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2549 $$(INCLUDE) \
2552 endef
2554 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2555 coinmp \
2558 else # SYSTEM_COINMP
2560 define gb_LinkTarget__use_coinmp
2561 $(call gb_LinkTarget_set_include,$(1),\
2562 $$(INCLUDE) \
2563 $(COINMP_CFLAGS) \
2565 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2567 endef
2569 endif
2571 else
2573 gb_LinkTarget__use_coinmp :=
2575 endif # ENABLE_COINMP
2577 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2579 define gb_LinkTarget__use_mDNSResponder
2580 $(call gb_LinkTarget_set_include,$(1),\
2581 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2582 $$(INCLUDE) \
2584 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2585 endef
2587 endif # MDNSRESPONDER
2589 ifeq ($(ENABLE_GIO),TRUE)
2591 define gb_LinkTarget__use_gio
2592 $(call gb_LinkTarget_set_include,$(1),\
2593 $$(INCLUDE) \
2594 $(GIO_CFLAGS) \
2597 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2599 endef
2601 else # ENABLE_GIO
2603 define gb_LinkTarget__use_gio
2605 endef
2607 endif # ENABLE_GIO
2609 ifeq ($(ENABLE_AVAHI),TRUE)
2611 define gb_LinkTarget__use_avahi
2612 $(call gb_LinkTarget_set_include,$(1),\
2613 $$(INCLUDE) \
2614 $(AVAHI_CFLAGS) \
2617 $(call gb_LinkTarget_add_defs,$(1),\
2618 -DENABLE_AVAHI \
2621 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2623 endef
2625 else # ENABLE_AVAHI
2627 gb_LinkTarget__use_avahi :=
2629 endif # ENABLE_AVAHI
2631 ifeq ($(ENABLE_CUPS),TRUE)
2633 define gb_LinkTarget__use_cups
2634 $(call gb_LinkTarget_add_defs,$(1),\
2635 -DENABLE_CUPS \
2638 $(call gb_LinkTarget_add_libs,$(1),\
2639 -lcups \
2642 endef
2644 else # ENABLE_CUPS
2646 define gb_LinkTarget__use_cups
2648 endef
2650 endif # ENABLE_CUPS
2652 ifeq ($(ENABLE_DBUS),TRUE)
2654 define gb_LinkTarget__use_dbus
2655 $(call gb_LinkTarget_set_include,$(1),\
2656 $$(INCLUDE) \
2657 $(DBUS_CFLAGS) \
2660 $(call gb_LinkTarget_add_libs,$(1),\
2661 $(DBUS_LIBS) \
2664 endef
2666 else # ENABLE_DBUS
2668 define gb_LinkTarget__use_dbus
2670 endef
2672 endif # ENABLE_DBUS
2675 ifneq ($(SYSTEM_LIBPNG),)
2677 define gb_LinkTarget__use_libpng
2678 $(call gb_LinkTarget_set_include,$(1),\
2679 $$(INCLUDE) \
2680 $(LIBPNG_CFLAGS) \
2683 $(call gb_LinkTarget_add_libs,$(1),\
2684 $(LIBPNG_LIBS) \
2687 endef
2689 gb_ExternalProject__use_libpng :=
2691 else # !SYSTEM_LIBPNG
2693 define gb_LinkTarget__use_libpng
2694 $(call gb_LinkTarget_set_include,$(1),\
2695 $(LIBPNG_CFLAGS) \
2696 $$(INCLUDE) \
2698 $(call gb_LinkTarget_use_static_libraries,$(1),\
2699 libpng \
2701 $(call gb_LinkTarget__use_zlib,$(1))
2703 endef
2705 define gb_ExternalProject__use_libpng
2706 $(call gb_ExternalProject_use_static_libraries,$(1),\
2707 libpng \
2710 endef
2712 endif # !SYSTEM_LIBPNG
2715 ifneq ($(SYSTEM_CURL),)
2717 define gb_LinkTarget__use_curl
2718 $(call gb_LinkTarget_add_defs,$(1),\
2719 -DSYSTEM_CURL \
2721 $(call gb_LinkTarget_set_include,$(1),\
2722 $$(INCLUDE) \
2723 $(CURL_CFLAGS) \
2725 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2727 endef
2729 else # !SYSTEM_CURL
2731 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2732 curl \
2735 define gb_LinkTarget__use_curl
2736 $(call gb_LinkTarget_use_package,$(1),curl)
2737 $(call gb_LinkTarget_set_include,$(1),\
2738 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2739 $$(INCLUDE) \
2742 ifeq ($(COM),MSC)
2743 $(call gb_LinkTarget_add_libs,$(1),\
2744 $(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 \
2746 else
2747 $(call gb_LinkTarget_add_libs,$(1),\
2748 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2750 endif
2752 endef
2754 endif # SYSTEM_CURL
2756 ifeq ($(ENABLE_VALGRIND),TRUE)
2758 define gb_LinkTarget__use_valgrind
2759 $(call gb_LinkTarget_add_defs,$(1),\
2760 -DHAVE_VALGRIND_HEADERS \
2763 $(call gb_LinkTarget_set_include,$(1),\
2764 $$(INCLUDE) \
2765 $(VALGRIND_CFLAGS) \
2768 endef
2770 else # !ENABLE_VALGRIND
2772 define gb_LinkTarget__use_valgrind
2774 endef
2776 endif # ENABLE_VALGRIND
2778 ifeq ($(ENABLE_POPPLER),TRUE)
2780 ifneq ($(SYSTEM_POPPLER),)
2782 define gb_LinkTarget__use_poppler
2783 $(call gb_LinkTarget_set_include,$(1),\
2784 $(POPPLER_CFLAGS) \
2785 $$(INCLUDE) \
2788 $(call gb_LinkTarget_add_libs,$(1),\
2789 $(POPPLER_LIBS) \
2792 endef
2794 else # !SYSTEM_POPPLER
2796 define gb_LinkTarget__use_poppler
2797 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2799 $(call gb_LinkTarget_set_include,$(1),\
2800 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2801 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2802 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2803 $$(INCLUDE) \
2806 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
2808 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2810 ifeq ($(OS),MACOSX)
2811 $(call gb_LinkTarget_add_libs,$(1),\
2812 -lobjc \
2814 else ifeq ($(OS),LINUX)
2815 $(call gb_LinkTarget_add_libs,$(1),\
2816 -pthread \
2818 else ifeq ($(OS),WNT)
2819 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2820 advapi32 \
2821 gdi32 \
2823 endif
2825 endef
2827 endif # SYSTEM_POPPLER
2829 endif # ENABLE_POPPLER
2832 ifneq ($(SYSTEM_CLUCENE),)
2834 define gb_LinkTarget__use_clucene
2835 $(call gb_LinkTarget_add_defs,$(1),\
2836 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2839 $(call gb_LinkTarget_set_include,$(1),\
2840 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2841 $$(INCLUDE) \
2844 $(call gb_LinkTarget_add_libs,$(1),\
2845 $(CLUCENE_LIBS) \
2848 endef
2850 else # !SYSTEM_CLUCENE
2852 define gb_LinkTarget__use_clucene
2853 $(call gb_LinkTarget_set_include,$(1),\
2854 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2855 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2856 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2857 $$(INCLUDE) \
2860 $(call gb_LinkTarget_use_libraries,$(1),\
2861 clucene \
2864 endef
2866 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2867 clucene \
2870 endif # SYSTEM_CLUCENE
2872 define gb_LinkTarget__use_gobject
2873 $(call gb_LinkTarget_add_libs,$(1),\
2874 $(GOBJECT_LIBS) \
2877 $(call gb_LinkTarget_set_include,$(1),\
2878 $$(INCLUDE) \
2879 $(GOBJECT_CFLAGS) \
2881 endef
2883 ifneq ($(SYSTEM_HSQLDB),)
2885 define gb_LinkTarget__use_hsqldb
2887 $(call gb_LinkTarget_add_defs,$(1),\
2888 -DSYSTEM_HSQLDB \
2889 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2892 endef
2894 else # !SYSTEM_HSQLDB
2896 define gb_LinkTarget__use_hsqldb
2898 endef
2900 endif # SYSTEM_HSQLDB
2902 ifeq ($(ENABLE_LDAP),TRUE)
2903 ifneq ($(SYSTEM_OPENLDAP),)
2905 define gb_LinkTarget__use_openldap
2907 $(call gb_LinkTarget_add_libs,$(1),\
2908 -lldap \
2909 -llber \
2912 endef
2914 gb_ExternalProject__use_openldap :=
2916 else # !SYSTEM_OPENLDAP
2918 define gb_LinkTarget__use_openldap
2919 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2920 $(call gb_LinkTarget_set_include,$(1),\
2921 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2922 $$(INCLUDE) \
2924 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2925 $(call gb_LinkTarget_add_libs,$(1), \
2926 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2927 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2930 endef
2931 endif
2933 define gb_ExternalProject__use_openldap
2934 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2936 endef
2938 endif # SYSTEM_OPENLDAP
2940 ifneq ($(SYSTEM_LIBTOMMATH),)
2942 define gb_LinkTarget__use_libtommath
2943 $(call gb_LinkTarget_set_include,$(1),\
2944 $(LIBTOMMATH_CFLAGS) \
2945 $$(INCLUDE) \
2947 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2949 endef
2951 else # !SYSTEM_LIBTOMMATH
2952 define gb_LinkTarget__use_libtommath
2953 $(call gb_LinkTarget_set_include,$(1),\
2954 -I${WORKDIR}/UnpackedTarball/libtommath \
2955 $$(INCLUDE) \
2957 $(call gb_LinkTarget_add_libs,$(1),\
2958 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2960 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2962 endef
2964 endif # SYSTEM_LIBTOMMATH
2966 define gb_ExternalProject__use_libtommath
2967 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2969 endef
2971 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
2973 ifneq ($(SYSTEM_FIREBIRD),)
2975 define gb_LinkTarget__use_libfbembed
2976 $(call gb_LinkTarget_set_include,$(1),\
2977 $(FIREBIRD_CFLAGS) \
2978 $$(INCLUDE) \
2980 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
2982 endef
2984 else # !SYSTEM_FIREBIRD
2986 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
2987 firebird \
2990 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
2991 #$(call gb_LinkTarget__use_libtommath,$(1))
2993 define gb_LinkTarget__use_libfbembed
2994 $(call gb_LinkTarget_use_package,$(1),firebird)
2995 $(call gb_LinkTarget_set_include,$(1),\
2996 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
2997 $$(INCLUDE) \
2999 ifeq ($(COM),MSC)
3000 $(call gb_LinkTarget_add_libs,$(1),\
3001 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3003 else
3004 $(call gb_LinkTarget_add_libs,$(1),\
3005 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3007 endif
3009 endef
3012 # endef
3014 endif # SYSTEM_FIREBIRD
3016 else # !ENABLE_FIREBIRD_SDBC
3018 gb_LinkTarget__use_firebird :=
3019 # gb_LinkTarget__use_atomic_ops :=
3020 # gb_LinkTarget__use_libtommath :=
3022 endif # ENABLE_FIREBIRD_SDBC
3025 ifneq ($(SYSTEM_POSTGRESQL),)
3027 define gb_LinkTarget__use_postgresql
3029 $(call gb_LinkTarget_set_include,$(1),\
3030 $(POSTGRESQL_INC) \
3031 $$(INCLUDE) \
3034 $(call gb_LinkTarget_add_libs,$(1),\
3035 -lpq \
3038 $(call gb_LinkTarget_add_ldflags,$(1),\
3039 $(POSTGRESQL_LIB) \
3042 endef
3044 else # !SYSTEM_POSTGRESQL
3046 define gb_LinkTarget__use_postgresql
3048 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
3050 $(call gb_LinkTarget_set_include,$(1),\
3051 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3052 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3053 $$(INCLUDE) \
3056 $(call gb_LinkTarget_add_libs,$(1),\
3057 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3060 ifeq ($(OS),WNT)
3061 $(call gb_LinkTarget_use_external,$(1),openssl)
3063 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3064 secur32 \
3065 ws2_32 \
3068 endif
3070 endef
3072 endif # SYSTEM_POSTGRESQL
3074 ifeq ($(ENABLE_KF5),TRUE)
3076 define gb_LinkTarget__use_kf5
3077 $(call gb_LinkTarget_set_include,$(1),\
3078 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3079 $$(INCLUDE) \
3082 $(call gb_LinkTarget_add_cxxflags,$(1),\
3083 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3086 $(call gb_LinkTarget_add_libs,$(1),\
3087 $(KF5_LIBS) \
3090 endef
3092 else # !ENABLE_KF5
3094 define gb_LinkTarget__use_kf5
3096 endef
3098 endif # ENABLE_KF5
3102 ifeq ($(ENABLE_QT5),TRUE)
3104 define gb_LinkTarget__use_qt5
3105 $(call gb_LinkTarget_set_include,$(1),\
3106 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3107 $$(INCLUDE) \
3110 $(call gb_LinkTarget_add_defs,$(1),\
3111 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3114 $(call gb_LinkTarget_add_libs,$(1),\
3115 $(QT5_LIBS) \
3118 endef
3120 else # !ENABLE_QT5
3122 define gb_LinkTarget__use_qt5
3124 endef
3126 endif # ENABLE_QT5
3128 # PYTHON
3129 # extra python_headers external because pyuno wrapper must not link python
3130 ifneq ($(SYSTEM_PYTHON),)
3132 define gb_LinkTarget__use_python_headers
3133 $(call gb_LinkTarget_add_defs,$(1),\
3134 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3137 $(call gb_LinkTarget_set_include,$(1),\
3138 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3139 $$(INCLUDE) \
3142 endef
3144 define gb_LinkTarget__use_python
3145 $(call gb_LinkTarget__use_python_headers,$(1))
3147 $(call gb_LinkTarget_add_libs,$(1),\
3148 $(PYTHON_LIBS) \
3151 endef
3153 else # !SYSTEM_PYTHON
3155 $(eval $(call gb_Helper_register_packages_for_install,python,\
3156 python3 \
3159 define gb_LinkTarget__use_python_headers
3160 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3161 $(call gb_LinkTarget_set_include,$(1),\
3162 -I$(call gb_UnpackedTarball_get_dir,python3) \
3163 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3164 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3165 $$(INCLUDE) \
3168 endef
3170 define gb_LinkTarget__use_python
3171 $(call gb_LinkTarget__use_python_headers,$(1))
3172 ifeq ($(OS),MACOSX)
3173 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3174 else
3175 $(call gb_LinkTarget_use_package,$(1),python3)
3176 endif
3178 ifeq ($(OS),WNT)
3179 $(call gb_LinkTarget_add_libs,$(1),\
3180 $(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 \
3182 else ifeq ($(OS),MACOSX)
3183 $(call gb_LinkTarget_add_libs,$(1),\
3184 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3186 else
3187 $(call gb_LinkTarget_add_libs,$(1),\
3188 -L$(call gb_UnpackedTarball_get_dir,python3) \
3189 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3191 endif
3193 endef
3195 # this is only used by python currently
3196 define gb_ExternalProject__use_libffi
3197 $(call gb_ExternalProject_use_external_project,$(1),libffi)
3199 endef
3201 endif # SYSTEM_PYTHON
3203 # ORCUS
3204 ifneq ($(SYSTEM_LIBORCUS),)
3206 define gb_LinkTarget__use_orcus
3207 $(call gb_LinkTarget_set_include,$(1),\
3208 $$(INCLUDE) \
3209 $(ORCUS_CFLAGS) \
3211 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3212 endef
3214 define gb_LinkTarget__use_orcus-parser
3216 endef
3218 else # !SYSTEM_LIBORCUS
3220 ifeq ($(COM),MSC)
3222 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3223 orcus \
3224 orcus-parser \
3227 define gb_LinkTarget__use_orcus
3228 $(call gb_LinkTarget_set_include,$(1),\
3229 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3230 $$(INCLUDE) \
3233 $(call gb_LinkTarget_use_libraries,$(1),\
3234 orcus \
3237 endef
3239 define gb_LinkTarget__use_orcus-parser
3240 $(call gb_LinkTarget_set_include,$(1),\
3241 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3242 $$(INCLUDE) \
3245 $(call gb_LinkTarget_use_libraries,$(1),\
3246 orcus-parser \
3249 endef
3251 else # !MSC
3253 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3254 liborcus \
3257 define gb_LinkTarget__use_orcus
3258 $(call gb_LinkTarget_use_package,$(1),liborcus)
3260 $(call gb_LinkTarget_set_include,$(1),\
3261 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3262 $$(INCLUDE) \
3265 $(call gb_LinkTarget_add_libs,$(1),\
3266 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.15 \
3269 $(if $(SYSTEM_BOOST), \
3270 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3271 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3274 endef
3276 define gb_LinkTarget__use_orcus-parser
3277 $(call gb_LinkTarget_use_package,$(1),liborcus)
3279 $(call gb_LinkTarget_set_include,$(1),\
3280 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3281 $$(INCLUDE) \
3284 $(call gb_LinkTarget_add_libs,$(1),\
3285 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.15 \
3288 endef
3290 endif # MSC
3292 endif # SYSTEM_LIBORCUS
3294 ifeq ($(ENABLE_EOT),TRUE)
3296 ifneq ($(SYSTEM_LIBEOT),)
3298 define gb_LinkTarget__use_libeot
3299 $(call gb_LinkTarget_set_include,$(1),\
3300 $$(INCLUDE) \
3301 $(LIBEOT_CFLAGS) \
3303 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3305 endef
3307 gb_ExternalProject__use_libeot :=
3309 else # !SYSTEM_LIBEOT
3311 define gb_LinkTarget__use_libeot
3312 $(call gb_LinkTarget_set_include,$(1),\
3313 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3314 $$(INCLUDE) \
3316 $(call gb_LinkTarget_add_libs,$(1),\
3317 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3319 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3321 endef
3323 define gb_ExternalProject__use_libeot
3324 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3326 endef
3328 endif # SYSTEM_LIBEOT
3330 else # !ENABLE_EOT
3332 gb_LinkTarget__use_libeot :=
3333 gb_ExternalProject__use_libeot :=
3335 endif # ENABLE_EOT
3337 ### X11 stuff ###
3339 ifeq ($(USING_X11), TRUE)
3341 define gb_LinkTarget__use_Xrandr
3342 $(call gb_LinkTarget_set_include,$(1),\
3343 $$(INCLUDE) \
3344 $(XRANDR_CFLAGS) \
3347 $(call gb_LinkTarget_add_libs,$(1),\
3348 $(XRANDR_LIBS) \
3350 endef
3352 define gb_LinkTarget__use_Xrender
3353 $(call gb_LinkTarget_set_include,$(1),\
3354 $$(INCLUDE) \
3355 $(XRENDER_CFLAGS) \
3358 $(call gb_LinkTarget_add_libs,$(1),\
3359 $(XRENDER_LIBS) \
3361 endef
3363 endif # USING_X11
3366 gb_ExternalProject__use_nss3:=
3369 ifneq ($(SYSTEM_NSS),)
3371 define gb_LinkTarget__use_nss3
3372 $(call gb_LinkTarget_add_defs,$(1),\
3373 -DSYSTEM_NSS \
3376 $(call gb_LinkTarget_set_include,$(1),\
3377 $$(INCLUDE) \
3378 $(NSS_CFLAGS) \
3381 $(call gb_LinkTarget_add_libs,$(1),\
3382 $(NSS_LIBS) \
3385 endef
3387 define gb_LinkTarget__use_plc4
3388 $(call gb_LinkTarget__use_nss3,$(1))
3390 endef
3392 define gb_LinkTarget__use_ssl3
3393 $(call gb_LinkTarget__use_nss3,$(1))
3395 endef
3397 else # !SYSTEM_NSS
3399 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3400 nss \
3403 define gb_LinkTarget__use_nss3
3404 $(call gb_LinkTarget_use_package,$(1),nss)
3405 $(call gb_LinkTarget_set_include,$(1),\
3406 $$(INCLUDE) \
3407 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3408 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3411 ifeq ($(COM),MSC)
3412 $(call gb_LinkTarget_add_libs,$(1),\
3413 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3414 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3415 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3417 else
3418 $(call gb_LinkTarget_add_libs,$(1),\
3419 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3420 -lnspr4 \
3421 -lnss3 \
3422 -lsmime3 \
3424 endif
3426 endef
3428 define gb_LinkTarget__use_plc4
3429 $(call gb_LinkTarget_use_package,$(1),nss)
3430 ifeq ($(COM),MSC)
3431 $(call gb_LinkTarget_add_libs,$(1),\
3432 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3434 else
3435 $(call gb_LinkTarget_add_libs,$(1),\
3436 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3438 endif
3440 endef
3442 define gb_LinkTarget__use_ssl3
3443 $(call gb_LinkTarget_use_package,$(1),nss)
3444 ifeq ($(COM),MSC)
3445 $(call gb_LinkTarget_add_libs,$(1),\
3446 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3448 else
3449 $(call gb_LinkTarget_add_libs,$(1),\
3450 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3452 endif
3454 endef
3456 define gb_ExternalProject__use_nss3
3457 $(call gb_ExternalProject_use_package,$(1),nss)
3459 endef
3461 endif # SYSTEM_NSS
3463 ifeq ($(ENABLE_BREAKPAD),TRUE)
3465 define gb_LinkTarget__use_breakpad
3466 $(call gb_LinkTarget_set_include,$(1),\
3467 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3468 $$(INCLUDE) \
3471 ifeq ($(COM),MSC)
3472 $(call gb_LinkTarget_use_static_libraries,$(1),\
3473 breakpad \
3475 else
3476 $(call gb_LinkTarget_add_libs,$(1),\
3477 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3479 endif
3481 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3483 endef
3485 endif # ENABLE_BREAKPAD
3487 ifeq ($(ENABLE_GPGMEPP),TRUE)
3489 ifneq ($(SYSTEM_GPGMEPP),)
3491 gb_ExternalProject__use_gpgmepp:=
3492 gb_ExternalProject__use_libassuan:=
3493 gb_ExternalProject__use_libgpg-error:=
3495 define gb_LinkTarget__use_gpgmepp
3496 $(call gb_LinkTarget_set_include,$(1),\
3497 $$(INCLUDE) \
3498 $$(GPGMEPP_CFLAGS) \
3501 $(call gb_LinkTarget_add_libs,$(1),\
3502 $(GPGMEPP_LIBS) \
3505 endef
3507 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3509 define gb_ExternalProject__use_gpgmepp
3510 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3512 endef
3513 define gb_ExternalProject__use_libassuan
3514 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3516 endef
3517 define gb_ExternalProject__use_libgpg-error
3518 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3520 endef
3522 ifneq ($(filter WNT,$(OS)),)
3524 define gb_LinkTarget__use_libgpg-error
3525 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3527 $(call gb_LinkTarget_set_include,$(1),\
3528 $(GPG_ERROR_CFLAGS) \
3529 $$(INCLUDE) \
3531 $(call gb_LinkTarget_add_libs,$(1),\
3532 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3535 endef
3537 define gb_LinkTarget__use_libassuan
3538 $(call gb_LinkTarget_use_package,$(1),libassuan)
3540 $(call gb_LinkTarget_set_include,$(1),\
3541 $(LIBASSUAN_CFLAGS) \
3542 $$(INCLUDE) \
3544 $(call gb_LinkTarget_add_libs,$(1),\
3545 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3548 endef
3550 define gb_LinkTarget__use_gpgmepp
3551 $(call gb_LinkTarget_set_include,$(1),\
3552 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3553 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3554 $$(GPG_ERROR_CFLAGS) \
3555 $$(INCLUDE) \
3557 $(call gb_LinkTarget_use_libraries,$(1),\
3558 gpgmepp \
3561 endef
3563 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3564 libassuan \
3565 libgpg-error \
3568 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3569 gpgmepp \
3572 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
3573 gpgme-w32spawn \
3576 endif
3578 ifneq ($(filter MACOSX LINUX,$(OS)),)
3580 define gb_LinkTarget__use_gpgmepp
3581 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3583 $(call gb_LinkTarget_set_include,$(1),\
3584 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3585 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3586 $$(GPG_ERROR_CFLAGS) \
3587 $$(INCLUDE) \
3589 $(call gb_LinkTarget_add_libs,$(1),\
3590 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3591 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3592 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3593 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3596 endef
3598 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3599 gpgmepp \
3600 libassuan \
3601 libgpg-error \
3604 endif
3606 endif
3608 else # !ENABLE_GPGMEPP
3610 gb_ExternalProject__use_gpgmepp :=
3611 gb_ExternalProject__use_libassuan :=
3612 gb_ExternalProject__use_libgpg-error :=
3614 gb_LinkTarget__use_gpgmepp :=
3615 gb_LinkTarget__use_libassuan :=
3616 gb_LinkTarget__use_libgpg-error :=
3618 endif # ENABLE_GPGMEPP
3620 define gb_LinkTarget__use_dconf
3621 $(call gb_LinkTarget_set_include,$(1),\
3622 $$(INCLUDE) \
3623 $(DCONF_CFLAGS) \
3626 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3627 endef
3629 ### Jars ############################################################
3631 ifneq ($(SYSTEM_HSQLDB),)
3633 define gb_Jar__use_hsqldb
3634 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3635 endef
3636 define gb_JunitTest__use_hsqldb
3637 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3638 endef
3640 else # !SYSTEM_HSQLDB
3642 ifeq ($(ENABLE_JAVA),TRUE)
3643 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3644 hsqldb \
3646 endif
3648 define gb_Jar__use_hsqldb
3649 $(call gb_Jar_use_jar,$(1),hsqldb)
3650 endef
3651 define gb_JunitTest__use_hsqldb
3652 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3653 endef
3655 endif # SYSTEM_HSQLDB
3658 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3660 ifneq ($(SYSTEM_BSH),)
3662 define gb_Jar__use_bsh
3663 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3664 endef
3666 else # !SYSTEM_BSH
3668 ifeq ($(ENABLE_JAVA),TRUE)
3669 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3670 bsh \
3672 endif
3674 define gb_Jar__use_bsh
3675 $(call gb_Jar_use_jar,$(1),bsh)
3676 endef
3678 endif # SYSTEM_BSH
3680 endif
3682 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3684 ifneq ($(SYSTEM_RHINO),)
3686 define gb_Jar__use_rhino
3687 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3688 endef
3690 else # !SYSTEM_RHINO
3692 ifeq ($(ENABLE_JAVA),TRUE)
3693 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3694 js \
3696 endif
3698 define gb_Jar__use_rhino
3699 $(call gb_Jar_use_jar,$(1),js)
3700 endef
3702 endif # SYSTEM_RHINO
3704 endif
3706 ifneq ($(SYSTEM_APACHE_COMMONS),)
3708 define gb_Jar__use_commons-logging
3709 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3710 endef
3711 gb_ExternalProject__use_commons-logging :=
3713 else # !SYSTEM_APACHE_COMMONS
3715 ifeq ($(ENABLE_JAVA),TRUE)
3716 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3717 commons-logging-$(COMMONS_LOGGING_VERSION) \
3719 endif
3721 define gb_Jar__use_commons-logging
3722 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3723 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3724 endef
3725 define gb_ExternalProject__use_commons-logging
3726 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3727 endef
3729 endif # SYSTEM_APACHE_COMMONS
3732 ifneq ($(SYSTEM_JFREEREPORT),)
3734 define gb_Jar__use_flow-engine
3735 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3736 endef
3738 define gb_Jar__use_flute
3739 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3740 endef
3742 define gb_Jar__use_libbase
3743 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3744 endef
3746 define gb_Jar__use_libfonts
3747 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3748 endef
3750 define gb_Jar__use_libformula
3751 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3752 endef
3754 define gb_Jar__use_liblayout
3755 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3756 endef
3758 define gb_Jar__use_libloader
3759 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3760 endef
3762 define gb_Jar__use_librepository
3763 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3764 endef
3766 define gb_Jar__use_libserializer
3767 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3768 endef
3770 define gb_Jar__use_libxml
3771 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3772 endef
3774 define gb_Jar__use_sac
3775 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3776 endef
3778 else # !SYSTEM_JFREEREPORT
3780 ifeq ($(ENABLE_JAVA),TRUE)
3781 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3782 flow-engine \
3783 flute-1.1.6 \
3784 libbase-1.1.6 \
3785 libfonts-1.1.6 \
3786 libformula-1.1.7 \
3787 liblayout \
3788 libloader-1.1.6 \
3789 librepository-1.1.6 \
3790 libserializer-1.1.6 \
3791 libxml-1.1.7 \
3792 sac \
3794 endif
3796 define gb_Jar__use_flow-engine
3797 $(call gb_Jar_use_jar,$(1),flow-engine)
3798 endef
3800 define gb_Jar__use_flute
3801 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3802 endef
3804 define gb_Jar__use_libbase
3805 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3806 endef
3808 define gb_Jar__use_libfonts
3809 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3810 endef
3812 define gb_Jar__use_libformula
3813 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3814 endef
3816 define gb_Jar__use_liblayout
3817 $(call gb_Jar_use_jar,$(1),liblayout)
3818 endef
3820 define gb_Jar__use_libloader
3821 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3822 endef
3824 define gb_Jar__use_librepository
3825 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3826 endef
3828 define gb_Jar__use_libserializer
3829 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3830 endef
3832 define gb_Jar__use_libxml
3833 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3834 endef
3836 define gb_Jar__use_sac
3837 $(call gb_Jar_use_jar,$(1),sac)
3838 endef
3840 endif # SYSTEM_JFREEREPORT
3843 # Executables
3845 # FIXME: the library target should be for build too
3846 define gb_Executable__register_bestreversemap
3847 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3848 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3850 endef
3852 # TODO depending on the whole URE might be overkill, but I do not have a
3853 # Windows machine to debug it...
3854 # FIXME: the library target should be for build too
3855 define gb_Executable__register_climaker
3856 $(call gb_Executable_add_runtime_dependencies,climaker,\
3857 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3858 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3859 $(call gb_UnoApi_get_target,udkapi) \
3860 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3862 endef
3864 define gb_Executable__register_cppumaker
3865 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3866 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3868 endef
3870 # This is used to determine what we need for 'build' platform.
3871 # FIXME: the library target should be for build too
3872 define gb_Executable__register_gengal
3873 $(call gb_Executable_add_runtime_dependencies,gengal,\
3874 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3875 $(call gb_Package_get_target_for_build,postprocess_images) \
3876 $(call gb_Package_get_target_for_build,postprocess_registry) \
3877 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3878 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3879 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3880 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3881 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3882 $(call gb_UnoApi_get_target,offapi) \
3883 $(call gb_UnoApi_get_target,udkapi) \
3885 endef
3887 ifeq ($(SYSTEM_ICU),)
3889 define gb_Executable__register_gendict
3890 $(call gb_Executable_add_runtime_dependencies,gendict,\
3891 $(call gb_Package_get_target_for_build,icu) \
3892 $(call gb_Package_get_target_for_build,icu_ure) \
3894 endef
3896 endif
3898 define gb_Executable__register_idlc
3899 $(call gb_Executable_add_runtime_dependencies,idlc,\
3900 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3902 endef
3904 define gb_Executable__register_localize
3905 $(call gb_Executable_add_runtime_dependencies,localize,\
3906 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3907 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3910 endef
3912 # FIXME ure/services.rdb needs cleanup
3913 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3914 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3915 # FIXME: the library target should be for build too
3916 define gb_Executable__register_saxparser
3917 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3918 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3919 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3920 $(call gb_Rdb_get_target_for_build,saxparser) \
3921 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3922 $(call gb_UnoApi_get_target,udkapi) \
3924 endef
3926 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3927 # required due to the settings for URE_SERVICES and URE_TYPES in
3928 # cppuhelper/source/unorc
3929 # FIXME: the library target should be for build too
3930 define gb_Executable__register_uno
3931 $(call gb_Executable_add_runtime_dependencies,uno,\
3932 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3933 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3934 $(call gb_UnoApi_get_target,udkapi) \
3936 endef
3939 # External executables
3941 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3943 gb_ExternalExecutable__register_xmllint :=
3945 else # ! SYSTEM_LIBXML_FOR_BUILD
3947 define gb_ExternalExecutable__register_xmllint
3948 $(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)
3949 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3950 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3951 $(call gb_Package_get_target,libxml2) \
3954 endef
3956 endif # SYSTEM_LIBXML_FOR_BUILD
3958 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3960 gb_ExternalExecutable__register_xsltproc :=
3962 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3964 define gb_ExternalExecutable__register_xsltproc
3965 $(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)
3966 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3967 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3968 $(call gb_Package_get_target,libxml2) \
3969 $(call gb_Package_get_target,libxslt) \
3972 endef
3974 endif # SYSTEM_LIBXSLT_FOR_BUILD
3976 ifneq (,$(SYSTEM_UCPP))
3978 gb_ExternalExecutable__register_ucpp :=
3980 else # ! SYSTEM_UCPP
3982 define gb_ExternalExecutable__register_ucpp
3983 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3985 endef
3987 endif # SYSTEM_UCPP
3989 ifeq (,$(PYTHON_FOR_BUILD))
3991 define gb_ExternalExecutable__register_python
3992 ifeq ($(OS),MACOSX)
3994 # use set_external, to avoid having the command added as prerequisite for the
3995 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3996 # matching rule to build that specific file)
3997 $(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))
3998 # the Zip ensures that internal python has been built (cannot use the Package
3999 # target, as that is not used on Mac)
4000 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4002 else
4004 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4005 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4006 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4008 endif
4010 endef
4012 else
4014 define gb_ExternalExecutable__register_python
4015 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4016 $(call gb_ExternalExecutable_set_precommand,python,PYTHONPATH=$$$$PYTHONPATH$$$${PYTHONPATH:+$$$${PYPATH:+:}}$$$$PYPATH)
4018 endef
4020 endif # PYTHON_FOR_BUILD
4022 ifneq ($(SYSTEM_GENBRK),)
4024 define gb_ExternalExecutable__register_genbrk
4025 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4027 endef
4029 else # ! SYSTEM_GENBRK
4031 define gb_ExternalExecutable__register_genbrk
4032 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4033 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4034 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4035 $(call gb_Package_get_target_for_build,icu) \
4036 $(call gb_Package_get_target_for_build,icu_ure) \
4039 endef
4041 endif
4043 ifneq ($(SYSTEM_GENCCODE),)
4045 define gb_ExternalExecutable__register_genccode
4046 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4048 endef
4050 else # ! SYSTEM_GENCCODE
4052 define gb_ExternalExecutable__register_genccode
4053 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4054 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4055 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4056 $(call gb_Package_get_target_for_build,icu) \
4057 $(call gb_Package_get_target_for_build,icu_ure) \
4060 endef
4062 endif
4064 ifneq ($(SYSTEM_GENCMN),)
4066 define gb_ExternalExecutable__register_gencmn
4067 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4069 endef
4071 else # ! SYSTEM_GENCMN
4073 define gb_ExternalExecutable__register_gencmn
4074 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4075 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4076 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4077 $(call gb_Package_get_target_for_build,icu) \
4078 $(call gb_Package_get_target_for_build,icu_ure) \
4081 endef
4083 endif
4085 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4087 $(eval $(call gb_Helper_register_jars,OXT,\
4088 owncloud-android-library \
4091 define gb_Jar__use_owncloud_android_lib
4092 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4093 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4094 endef
4095 define gb_ExternalProject__use_owncloud_android_lib
4096 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4097 endef
4099 endif
4101 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4102 ifneq ($(SYSTEM_BZIP2),)
4104 define gb_LinkTarget__use_bzip2
4105 $(call gb_LinkTarget_set_include,$(1),\
4106 $(BZIP2_CFLAGS) \
4107 $$(INCLUDE) \
4109 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4111 endef
4113 gb_ExternalProject__use_bzip2 :=
4115 else # !SYSTEM_BZIP2
4117 define gb_LinkTarget__use_bzip2
4118 $(call gb_LinkTarget_set_include,$(1),\
4119 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4120 $$(INCLUDE) \
4123 ifeq ($(COM),MSC)
4124 $(call gb_LinkTarget_add_libs,$(1),\
4125 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4127 else
4128 $(call gb_LinkTarget_add_libs,$(1),\
4129 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4131 endif
4133 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4134 endef
4136 define gb_ExternalProject__use_bzip2
4137 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4138 endef
4140 endif
4141 endif
4143 define gb_LinkTarget__use_clew
4144 $(call gb_LinkTarget_set_include,$(1), \
4145 -I$(SRCDIR)/external/clew/source/include \
4146 $$(INCLUDE) \
4148 $(call gb_LinkTarget_use_libraries,$(1),clew)
4149 endef
4151 ifneq ($(ENABLE_PDFIUM),)
4152 define gb_LinkTarget__use_pdfium
4153 $(call gb_LinkTarget_set_include,$(1),\
4154 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4155 -DCOMPONENT_BUILD \
4156 $$(INCLUDE) \
4158 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4159 endef
4160 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4161 pdfium \
4163 endif
4165 ifneq ($(SYSTEM_QRCODEGEN),)
4167 define gb_LinkTarget__use_qrcodegen
4168 $(call gb_LinkTarget_set_include,$(1),\
4169 -DSYSTEM_QRCODEGEN \
4170 $$(INCLUDE) \
4171 $(QRCODEGEN_CFLAGS) \
4173 $(call gb_LinkTarget_add_libs,$(1),$(QRCODEGEN_LIBS))
4175 endef
4177 gb_ExternalProject__use_qrcodegen :=
4179 else # !SYSTEM_QRCODEGEN
4181 define gb_LinkTarget__use_qrcodegen
4182 $(call gb_LinkTarget_use_unpacked,$(1),qrcodegen)
4183 $(call gb_LinkTarget_set_include,$(1),\
4184 -I$(call gb_UnpackedTarball_get_dir,qrcodegen/cpp/)\
4185 $$(INCLUDE) \
4187 $(call gb_LinkTarget_use_static_libraries,$(1),\
4188 qrcodegen \
4191 endef
4193 define gb_ExternalProject__use_qrcodegen
4194 $(call gb_ExternalProject_use_static_libraries,$(1),qrcodegen)
4196 endef
4198 endif # SYSTEM_QRCODEGEN
4200 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4201 $(if $(UCRT_REDISTDIR),ucrt) \
4204 # vim: set noet sw=4 ts=4: