lok: send message when in place editing
[LibreOffice.git] / RepositoryExternal.mk
blob6cf31f5c17ab29a8264a304b520a3fe752d7246d
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 endif # SYSTEM_PYTHON
3197 # ORCUS
3198 ifneq ($(SYSTEM_LIBORCUS),)
3200 define gb_LinkTarget__use_orcus
3201 $(call gb_LinkTarget_set_include,$(1),\
3202 $$(INCLUDE) \
3203 $(ORCUS_CFLAGS) \
3205 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3206 endef
3208 define gb_LinkTarget__use_orcus-parser
3210 endef
3212 else # !SYSTEM_LIBORCUS
3214 ifeq ($(COM),MSC)
3216 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3217 orcus \
3218 orcus-parser \
3221 define gb_LinkTarget__use_orcus
3222 $(call gb_LinkTarget_set_include,$(1),\
3223 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3224 $$(INCLUDE) \
3227 $(call gb_LinkTarget_use_libraries,$(1),\
3228 orcus \
3231 endef
3233 define gb_LinkTarget__use_orcus-parser
3234 $(call gb_LinkTarget_set_include,$(1),\
3235 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3236 $$(INCLUDE) \
3239 $(call gb_LinkTarget_use_libraries,$(1),\
3240 orcus-parser \
3243 endef
3245 else # !MSC
3247 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3248 liborcus \
3251 define gb_LinkTarget__use_orcus
3252 $(call gb_LinkTarget_use_package,$(1),liborcus)
3254 $(call gb_LinkTarget_set_include,$(1),\
3255 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3256 $$(INCLUDE) \
3259 $(call gb_LinkTarget_add_libs,$(1),\
3260 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.15 \
3263 $(if $(SYSTEM_BOOST), \
3264 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3265 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3268 endef
3270 define gb_LinkTarget__use_orcus-parser
3271 $(call gb_LinkTarget_use_package,$(1),liborcus)
3273 $(call gb_LinkTarget_set_include,$(1),\
3274 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3275 $$(INCLUDE) \
3278 $(call gb_LinkTarget_add_libs,$(1),\
3279 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.15 \
3282 endef
3284 endif # MSC
3286 endif # SYSTEM_LIBORCUS
3288 ifeq ($(ENABLE_EOT),TRUE)
3290 ifneq ($(SYSTEM_LIBEOT),)
3292 define gb_LinkTarget__use_libeot
3293 $(call gb_LinkTarget_set_include,$(1),\
3294 $$(INCLUDE) \
3295 $(LIBEOT_CFLAGS) \
3297 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3299 endef
3301 gb_ExternalProject__use_libeot :=
3303 else # !SYSTEM_LIBEOT
3305 define gb_LinkTarget__use_libeot
3306 $(call gb_LinkTarget_set_include,$(1),\
3307 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3308 $$(INCLUDE) \
3310 $(call gb_LinkTarget_add_libs,$(1),\
3311 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3313 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3315 endef
3317 define gb_ExternalProject__use_libeot
3318 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3320 endef
3322 endif # SYSTEM_LIBEOT
3324 else # !ENABLE_EOT
3326 gb_LinkTarget__use_libeot :=
3327 gb_ExternalProject__use_libeot :=
3329 endif # ENABLE_EOT
3331 ### X11 stuff ###
3333 ifeq ($(USING_X11), TRUE)
3335 define gb_LinkTarget__use_Xrandr
3336 $(call gb_LinkTarget_set_include,$(1),\
3337 $$(INCLUDE) \
3338 $(XRANDR_CFLAGS) \
3341 $(call gb_LinkTarget_add_libs,$(1),\
3342 $(XRANDR_LIBS) \
3344 endef
3346 define gb_LinkTarget__use_Xrender
3347 $(call gb_LinkTarget_set_include,$(1),\
3348 $$(INCLUDE) \
3349 $(XRENDER_CFLAGS) \
3352 $(call gb_LinkTarget_add_libs,$(1),\
3353 $(XRENDER_LIBS) \
3355 endef
3357 endif # USING_X11
3360 gb_ExternalProject__use_nss3:=
3363 ifneq ($(SYSTEM_NSS),)
3365 define gb_LinkTarget__use_nss3
3366 $(call gb_LinkTarget_add_defs,$(1),\
3367 -DSYSTEM_NSS \
3370 $(call gb_LinkTarget_set_include,$(1),\
3371 $$(INCLUDE) \
3372 $(NSS_CFLAGS) \
3375 $(call gb_LinkTarget_add_libs,$(1),\
3376 $(NSS_LIBS) \
3379 endef
3381 define gb_LinkTarget__use_plc4
3382 $(call gb_LinkTarget__use_nss3,$(1))
3384 endef
3386 define gb_LinkTarget__use_ssl3
3387 $(call gb_LinkTarget__use_nss3,$(1))
3389 endef
3391 else # !SYSTEM_NSS
3393 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3394 nss \
3397 define gb_LinkTarget__use_nss3
3398 $(call gb_LinkTarget_use_package,$(1),nss)
3399 $(call gb_LinkTarget_set_include,$(1),\
3400 $$(INCLUDE) \
3401 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3402 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3405 ifeq ($(COM),MSC)
3406 $(call gb_LinkTarget_add_libs,$(1),\
3407 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3408 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3409 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3411 else
3412 $(call gb_LinkTarget_add_libs,$(1),\
3413 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3414 -lnspr4 \
3415 -lnss3 \
3416 -lsmime3 \
3418 endif
3420 endef
3422 define gb_LinkTarget__use_plc4
3423 $(call gb_LinkTarget_use_package,$(1),nss)
3424 ifeq ($(COM),MSC)
3425 $(call gb_LinkTarget_add_libs,$(1),\
3426 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3428 else
3429 $(call gb_LinkTarget_add_libs,$(1),\
3430 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3432 endif
3434 endef
3436 define gb_LinkTarget__use_ssl3
3437 $(call gb_LinkTarget_use_package,$(1),nss)
3438 ifeq ($(COM),MSC)
3439 $(call gb_LinkTarget_add_libs,$(1),\
3440 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3442 else
3443 $(call gb_LinkTarget_add_libs,$(1),\
3444 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3446 endif
3448 endef
3450 define gb_ExternalProject__use_nss3
3451 $(call gb_ExternalProject_use_package,$(1),nss)
3453 endef
3455 endif # SYSTEM_NSS
3457 ifeq ($(ENABLE_BREAKPAD),TRUE)
3459 define gb_LinkTarget__use_breakpad
3460 $(call gb_LinkTarget_set_include,$(1),\
3461 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3462 $$(INCLUDE) \
3465 ifeq ($(COM),MSC)
3466 $(call gb_LinkTarget_use_static_libraries,$(1),\
3467 breakpad \
3469 else
3470 $(call gb_LinkTarget_add_libs,$(1),\
3471 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3473 endif
3475 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3477 endef
3479 endif # ENABLE_BREAKPAD
3481 ifeq ($(ENABLE_GPGMEPP),TRUE)
3483 ifneq ($(SYSTEM_GPGMEPP),)
3485 gb_ExternalProject__use_gpgmepp:=
3486 gb_ExternalProject__use_libassuan:=
3487 gb_ExternalProject__use_libgpg-error:=
3489 define gb_LinkTarget__use_gpgmepp
3490 $(call gb_LinkTarget_set_include,$(1),\
3491 $$(INCLUDE) \
3492 $$(GPGMEPP_CFLAGS) \
3495 $(call gb_LinkTarget_add_libs,$(1),\
3496 $(GPGMEPP_LIBS) \
3499 endef
3501 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3503 define gb_ExternalProject__use_gpgmepp
3504 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3506 endef
3507 define gb_ExternalProject__use_libassuan
3508 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3510 endef
3511 define gb_ExternalProject__use_libgpg-error
3512 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3514 endef
3516 ifneq ($(filter WNT,$(OS)),)
3518 define gb_LinkTarget__use_libgpg-error
3519 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3521 $(call gb_LinkTarget_set_include,$(1),\
3522 $(GPG_ERROR_CFLAGS) \
3523 $$(INCLUDE) \
3525 $(call gb_LinkTarget_add_libs,$(1),\
3526 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3529 endef
3531 define gb_LinkTarget__use_libassuan
3532 $(call gb_LinkTarget_use_package,$(1),libassuan)
3534 $(call gb_LinkTarget_set_include,$(1),\
3535 $(LIBASSUAN_CFLAGS) \
3536 $$(INCLUDE) \
3538 $(call gb_LinkTarget_add_libs,$(1),\
3539 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3542 endef
3544 define gb_LinkTarget__use_gpgmepp
3545 $(call gb_LinkTarget_set_include,$(1),\
3546 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3547 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3548 $$(GPG_ERROR_CFLAGS) \
3549 $$(INCLUDE) \
3551 $(call gb_LinkTarget_use_libraries,$(1),\
3552 gpgmepp \
3555 endef
3557 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3558 libassuan \
3559 libgpg-error \
3562 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3563 gpgmepp \
3566 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
3567 gpgme-w32spawn \
3570 endif
3572 ifneq ($(filter MACOSX LINUX,$(OS)),)
3574 define gb_LinkTarget__use_gpgmepp
3575 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3577 $(call gb_LinkTarget_set_include,$(1),\
3578 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3579 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3580 $$(GPG_ERROR_CFLAGS) \
3581 $$(INCLUDE) \
3583 $(call gb_LinkTarget_add_libs,$(1),\
3584 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3585 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3586 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3587 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3590 endef
3592 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3593 gpgmepp \
3594 libassuan \
3595 libgpg-error \
3598 endif
3600 endif
3602 else # !ENABLE_GPGMEPP
3604 gb_ExternalProject__use_gpgmepp :=
3605 gb_ExternalProject__use_libassuan :=
3606 gb_ExternalProject__use_libgpg-error :=
3608 gb_LinkTarget__use_gpgmepp :=
3609 gb_LinkTarget__use_libassuan :=
3610 gb_LinkTarget__use_libgpg-error :=
3612 endif # ENABLE_GPGMEPP
3614 define gb_LinkTarget__use_dconf
3615 $(call gb_LinkTarget_set_include,$(1),\
3616 $$(INCLUDE) \
3617 $(DCONF_CFLAGS) \
3620 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3621 endef
3623 ### Jars ############################################################
3625 ifneq ($(SYSTEM_HSQLDB),)
3627 define gb_Jar__use_hsqldb
3628 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3629 endef
3630 define gb_JunitTest__use_hsqldb
3631 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3632 endef
3634 else # !SYSTEM_HSQLDB
3636 ifeq ($(ENABLE_JAVA),TRUE)
3637 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3638 hsqldb \
3640 endif
3642 define gb_Jar__use_hsqldb
3643 $(call gb_Jar_use_jar,$(1),hsqldb)
3644 endef
3645 define gb_JunitTest__use_hsqldb
3646 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3647 endef
3649 endif # SYSTEM_HSQLDB
3652 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3654 ifneq ($(SYSTEM_BSH),)
3656 define gb_Jar__use_bsh
3657 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3658 endef
3660 else # !SYSTEM_BSH
3662 ifeq ($(ENABLE_JAVA),TRUE)
3663 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3664 bsh \
3666 endif
3668 define gb_Jar__use_bsh
3669 $(call gb_Jar_use_jar,$(1),bsh)
3670 endef
3672 endif # SYSTEM_BSH
3674 endif
3676 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3678 ifneq ($(SYSTEM_RHINO),)
3680 define gb_Jar__use_rhino
3681 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3682 endef
3684 else # !SYSTEM_RHINO
3686 ifeq ($(ENABLE_JAVA),TRUE)
3687 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3688 js \
3690 endif
3692 define gb_Jar__use_rhino
3693 $(call gb_Jar_use_jar,$(1),js)
3694 endef
3696 endif # SYSTEM_RHINO
3698 endif
3700 ifneq ($(SYSTEM_APACHE_COMMONS),)
3702 define gb_Jar__use_commons-logging
3703 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3704 endef
3705 gb_ExternalProject__use_commons-logging :=
3707 else # !SYSTEM_APACHE_COMMONS
3709 ifeq ($(ENABLE_JAVA),TRUE)
3710 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3711 commons-logging-$(COMMONS_LOGGING_VERSION) \
3713 endif
3715 define gb_Jar__use_commons-logging
3716 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3717 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3718 endef
3719 define gb_ExternalProject__use_commons-logging
3720 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3721 endef
3723 endif # SYSTEM_APACHE_COMMONS
3726 ifneq ($(SYSTEM_JFREEREPORT),)
3728 define gb_Jar__use_flow-engine
3729 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3730 endef
3732 define gb_Jar__use_flute
3733 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3734 endef
3736 define gb_Jar__use_libbase
3737 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3738 endef
3740 define gb_Jar__use_libfonts
3741 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3742 endef
3744 define gb_Jar__use_libformula
3745 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3746 endef
3748 define gb_Jar__use_liblayout
3749 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3750 endef
3752 define gb_Jar__use_libloader
3753 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3754 endef
3756 define gb_Jar__use_librepository
3757 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3758 endef
3760 define gb_Jar__use_libserializer
3761 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3762 endef
3764 define gb_Jar__use_libxml
3765 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3766 endef
3768 define gb_Jar__use_sac
3769 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3770 endef
3772 else # !SYSTEM_JFREEREPORT
3774 ifeq ($(ENABLE_JAVA),TRUE)
3775 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3776 flow-engine \
3777 flute-1.1.6 \
3778 libbase-1.1.6 \
3779 libfonts-1.1.6 \
3780 libformula-1.1.7 \
3781 liblayout \
3782 libloader-1.1.6 \
3783 librepository-1.1.6 \
3784 libserializer-1.1.6 \
3785 libxml-1.1.7 \
3786 sac \
3788 endif
3790 define gb_Jar__use_flow-engine
3791 $(call gb_Jar_use_jar,$(1),flow-engine)
3792 endef
3794 define gb_Jar__use_flute
3795 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3796 endef
3798 define gb_Jar__use_libbase
3799 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3800 endef
3802 define gb_Jar__use_libfonts
3803 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3804 endef
3806 define gb_Jar__use_libformula
3807 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3808 endef
3810 define gb_Jar__use_liblayout
3811 $(call gb_Jar_use_jar,$(1),liblayout)
3812 endef
3814 define gb_Jar__use_libloader
3815 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3816 endef
3818 define gb_Jar__use_librepository
3819 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3820 endef
3822 define gb_Jar__use_libserializer
3823 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3824 endef
3826 define gb_Jar__use_libxml
3827 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3828 endef
3830 define gb_Jar__use_sac
3831 $(call gb_Jar_use_jar,$(1),sac)
3832 endef
3834 endif # SYSTEM_JFREEREPORT
3837 # Executables
3839 # FIXME: the library target should be for build too
3840 define gb_Executable__register_bestreversemap
3841 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3842 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3844 endef
3846 # TODO depending on the whole URE might be overkill, but I do not have a
3847 # Windows machine to debug it...
3848 # FIXME: the library target should be for build too
3849 define gb_Executable__register_climaker
3850 $(call gb_Executable_add_runtime_dependencies,climaker,\
3851 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3852 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3853 $(call gb_UnoApi_get_target,udkapi) \
3854 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3856 endef
3858 define gb_Executable__register_cppumaker
3859 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3860 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3862 endef
3864 # This is used to determine what we need for 'build' platform.
3865 # FIXME: the library target should be for build too
3866 define gb_Executable__register_gengal
3867 $(call gb_Executable_add_runtime_dependencies,gengal,\
3868 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3869 $(call gb_Package_get_target_for_build,postprocess_images) \
3870 $(call gb_Package_get_target_for_build,postprocess_registry) \
3871 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3872 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3873 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3874 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3875 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3876 $(call gb_UnoApi_get_target,offapi) \
3877 $(call gb_UnoApi_get_target,udkapi) \
3879 endef
3881 ifeq ($(SYSTEM_ICU),)
3883 define gb_Executable__register_gendict
3884 $(call gb_Executable_add_runtime_dependencies,gendict,\
3885 $(call gb_Package_get_target_for_build,icu) \
3886 $(call gb_Package_get_target_for_build,icu_ure) \
3888 endef
3890 endif
3892 define gb_Executable__register_idlc
3893 $(call gb_Executable_add_runtime_dependencies,idlc,\
3894 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3896 endef
3898 define gb_Executable__register_localize
3899 $(call gb_Executable_add_runtime_dependencies,localize,\
3900 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3901 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3904 endef
3906 # FIXME ure/services.rdb needs cleanup
3907 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3908 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3909 # FIXME: the library target should be for build too
3910 define gb_Executable__register_saxparser
3911 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3912 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3913 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3914 $(call gb_Rdb_get_target_for_build,saxparser) \
3915 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3916 $(call gb_UnoApi_get_target,udkapi) \
3918 endef
3920 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3921 # required due to the settings for URE_SERVICES and URE_TYPES in
3922 # cppuhelper/source/unorc
3923 # FIXME: the library target should be for build too
3924 define gb_Executable__register_uno
3925 $(call gb_Executable_add_runtime_dependencies,uno,\
3926 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3927 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3928 $(call gb_UnoApi_get_target,udkapi) \
3930 endef
3933 # External executables
3935 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
3937 gb_ExternalExecutable__register_xmllint :=
3939 else # ! SYSTEM_LIBXML_FOR_BUILD
3941 define gb_ExternalExecutable__register_xmllint
3942 $(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)
3943 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
3944 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3945 $(call gb_Package_get_target,libxml2) \
3948 endef
3950 endif # SYSTEM_LIBXML_FOR_BUILD
3952 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
3954 gb_ExternalExecutable__register_xsltproc :=
3956 else # ! SYSTEM_LIBXSLT_FOR_BUILD
3958 define gb_ExternalExecutable__register_xsltproc
3959 $(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)
3960 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
3961 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
3962 $(call gb_Package_get_target,libxml2) \
3963 $(call gb_Package_get_target,libxslt) \
3966 endef
3968 endif # SYSTEM_LIBXSLT_FOR_BUILD
3970 ifneq (,$(SYSTEM_UCPP))
3972 gb_ExternalExecutable__register_ucpp :=
3974 else # ! SYSTEM_UCPP
3976 define gb_ExternalExecutable__register_ucpp
3977 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
3979 endef
3981 endif # SYSTEM_UCPP
3983 ifeq (,$(PYTHON_FOR_BUILD))
3985 define gb_ExternalExecutable__register_python
3986 ifeq ($(OS),MACOSX)
3988 # use set_external, to avoid having the command added as prerequisite for the
3989 # targets that make use of it. (Otherwise make will choke as it doesn't have a
3990 # matching rule to build that specific file)
3991 $(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))
3992 # the Zip ensures that internal python has been built (cannot use the Package
3993 # target, as that is not used on Mac)
3994 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
3996 else
3998 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
3999 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4000 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4002 endif
4004 endef
4006 else
4008 define gb_ExternalExecutable__register_python
4009 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4010 $(call gb_ExternalExecutable_set_precommand,python,PYTHONPATH=$$$$PYTHONPATH$$$${PYTHONPATH:+$$$${PYPATH:+:}}$$$$PYPATH)
4012 endef
4014 endif # PYTHON_FOR_BUILD
4016 ifneq ($(SYSTEM_GENBRK),)
4018 define gb_ExternalExecutable__register_genbrk
4019 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4021 endef
4023 else # ! SYSTEM_GENBRK
4025 define gb_ExternalExecutable__register_genbrk
4026 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4027 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4028 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4029 $(call gb_Package_get_target_for_build,icu) \
4030 $(call gb_Package_get_target_for_build,icu_ure) \
4033 endef
4035 endif
4037 ifneq ($(SYSTEM_GENCCODE),)
4039 define gb_ExternalExecutable__register_genccode
4040 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4042 endef
4044 else # ! SYSTEM_GENCCODE
4046 define gb_ExternalExecutable__register_genccode
4047 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4048 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4049 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4050 $(call gb_Package_get_target_for_build,icu) \
4051 $(call gb_Package_get_target_for_build,icu_ure) \
4054 endef
4056 endif
4058 ifneq ($(SYSTEM_GENCMN),)
4060 define gb_ExternalExecutable__register_gencmn
4061 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4063 endef
4065 else # ! SYSTEM_GENCMN
4067 define gb_ExternalExecutable__register_gencmn
4068 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4069 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4070 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4071 $(call gb_Package_get_target_for_build,icu) \
4072 $(call gb_Package_get_target_for_build,icu_ure) \
4075 endef
4077 endif
4079 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4081 $(eval $(call gb_Helper_register_jars,OXT,\
4082 owncloud-android-library \
4085 define gb_Jar__use_owncloud_android_lib
4086 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4087 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4088 endef
4089 define gb_ExternalProject__use_owncloud_android_lib
4090 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4091 endef
4093 endif
4095 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4096 ifneq ($(SYSTEM_BZIP2),)
4098 define gb_LinkTarget__use_bzip2
4099 $(call gb_LinkTarget_set_include,$(1),\
4100 $(BZIP2_CFLAGS) \
4101 $$(INCLUDE) \
4103 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4105 endef
4107 gb_ExternalProject__use_bzip2 :=
4109 else # !SYSTEM_BZIP2
4111 define gb_LinkTarget__use_bzip2
4112 $(call gb_LinkTarget_set_include,$(1),\
4113 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4114 $$(INCLUDE) \
4117 ifeq ($(COM),MSC)
4118 $(call gb_LinkTarget_add_libs,$(1),\
4119 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4121 else
4122 $(call gb_LinkTarget_add_libs,$(1),\
4123 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4125 endif
4127 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4128 endef
4130 define gb_ExternalProject__use_bzip2
4131 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4132 endef
4134 endif
4135 endif
4137 define gb_LinkTarget__use_clew
4138 $(call gb_LinkTarget_set_include,$(1), \
4139 -I$(SRCDIR)/external/clew/source/include \
4140 $$(INCLUDE) \
4142 $(call gb_LinkTarget_use_libraries,$(1),clew)
4143 endef
4145 ifneq ($(ENABLE_PDFIUM),)
4146 define gb_LinkTarget__use_pdfium
4147 $(call gb_LinkTarget_set_include,$(1),\
4148 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4149 $$(INCLUDE) \
4151 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4152 endef
4153 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4154 pdfium \
4156 endif
4158 ifneq ($(SYSTEM_QRCODEGEN),)
4160 define gb_LinkTarget__use_qrcodegen
4161 $(call gb_LinkTarget_set_include,$(1),\
4162 -DSYSTEM_QRCODEGEN \
4163 $$(INCLUDE) \
4164 $(QRCODEGEN_CFLAGS) \
4166 $(call gb_LinkTarget_add_libs,$(1),$(QRCODEGEN_LIBS))
4168 endef
4170 gb_ExternalProject__use_qrcodegen :=
4172 else # !SYSTEM_QRCODEGEN
4174 define gb_LinkTarget__use_qrcodegen
4175 $(call gb_LinkTarget_use_unpacked,$(1),qrcodegen)
4176 $(call gb_LinkTarget_set_include,$(1),\
4177 -I$(call gb_UnpackedTarball_get_dir,qrcodegen/cpp/)\
4178 $$(INCLUDE) \
4180 $(call gb_LinkTarget_use_static_libraries,$(1),\
4181 qrcodegen \
4184 endef
4186 define gb_ExternalProject__use_qrcodegen
4187 $(call gb_ExternalProject_use_static_libraries,$(1),qrcodegen)
4189 endef
4191 endif # SYSTEM_QRCODEGEN
4193 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4194 $(if $(UCRT_REDISTDIR),ucrt) \
4197 # vim: set noet sw=4 ts=4: