adding some fuzz to row height tolerance tests
[LibreOffice.git] / RepositoryExternal.mk
blob92ab41cbdea16dde64ed573e4dc44920887e240c
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 ifeq (SANE,$(filter SANE,$(BUILD_TYPE)))
116 define gb_LinkTarget__use_sane_headers
117 $(call gb_LinkTarget_set_include,$(1),\
118 $(if $(filter WNT,$(OS)), \
119 -I$(call gb_UnpackedTarball_get_dir,twain_dsm/pub/include), \
120 -I$(SRCDIR)/external/sane/inc) \
121 $$(INCLUDE) \
124 ifeq ($(OS),WNT)
125 $(call gb_LinkTarget_use_unpacked,$(1),twain_dsm)
126 endif
128 endef
130 else
132 gb_LinkTarget__use_sane_headers :=
134 endif
136 ifneq ($(SYSTEM_BLUEZ),)
138 gb_LinkTarget__use_bluez_bluetooth_headers :=
140 else # !SYSTEM_BLUEZ
142 define gb_LinkTarget__use_bluez_bluetooth_headers
143 $(call gb_LinkTarget_set_include,$(1),\
144 -I$(SRCDIR)/external/bluez_bluetooth/inc \
145 $$(INCLUDE) \
148 endef
150 endif # SYSTEM_BLUEZ
152 # External libraries
154 ifneq ($(SYSTEM_CPPUNIT),)
156 define gb_LinkTarget__use_cppunit
157 $(call gb_LinkTarget_set_include,$(1),\
158 $$(INCLUDE) \
159 $(CPPUNIT_CFLAGS) \
162 $(call gb_LinkTarget_add_libs,$(1),\
163 $(CPPUNIT_LIBS) \
166 endef
168 else # !SYSTEM_CPPUNIT
170 define gb_LinkTarget__use_cppunit
171 $(call gb_LinkTarget_use_external_project,$(1),cppunit, full)
173 $(call gb_LinkTarget_set_include,$(1),\
174 -I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
175 $$(INCLUDE) \
178 ifeq ($(COM),MSC)
179 $(call gb_LinkTarget_add_libs,$(1),\
180 $(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/$(if $(MSVC_USE_DEBUG_RUNTIME),DebugDll/cppunitd_dll.lib,ReleaseDll/cppunit_dll.lib) \
182 else
183 $(call gb_LinkTarget_add_libs,$(1),\
184 -L$(call gb_UnpackedTarball_get_dir,cppunit)/src/cppunit/.libs -lcppunit \
186 endif
188 endef
190 endif # SYSTEM_CPPUNIT
192 ifneq ($(SYSTEM_EPOXY),)
194 define gb_LinkTarget__use_epoxy
195 $(call gb_LinkTarget_set_include,$(1),\
196 $$(INCLUDE) \
197 $(EPOXY_CFLAGS) \
199 $(call gb_LinkTarget_add_libs,$(1),$(EPOXY_LIBS))
201 endef
203 gb_ExternalProject__use_epoxy :=
205 else # !SYSTEM_EPOXY
207 define gb_LinkTarget__use_epoxy
208 $(call gb_LinkTarget_set_include,$(1),\
209 -I$(call gb_UnpackedTarball_get_dir,epoxy/include) \
210 $$(INCLUDE) \
213 $(call gb_LinkTarget_use_libraries,$(1),\
214 epoxy \
217 endef
219 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
220 epoxy \
223 define gb_ExternalProject__use_epoxy
224 $(call gb_ExternalProject_use_external_project,$(1),epoxy)
226 endef
228 endif # SYSTEM_EPOXY
230 define gb_LinkTarget__use_iconv
231 $(call gb_LinkTarget_add_libs,$(1),-liconv)
233 endef
235 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
237 define gb_LinkTarget__use_mariadb-connector-c
238 $(call gb_LinkTarget_set_include,$(1),\
239 $$(INCLUDE) \
240 $(MARIADB_CFLAGS) \
242 $(call gb_LinkTarget_add_libs,$(1),$(MARIADB_LIBS))
244 endef
245 gb_ExternalProject__use_mariadb-connector-c :=
247 else # !SYSTEM_MARIADB_CONNECTOR_C
249 define gb_LinkTarget__use_mariadb-connector-c
250 $(call gb_LinkTarget_set_include,$(1),\
251 $$(INCLUDE) \
252 $(MARIADB_CFLAGS) \
254 $(call gb_LinkTarget_use_static_libraries,$(1),\
255 mariadb-connector-c \
258 endef
259 define gb_ExternalProject__use_mariadb-connector-c
260 $(call gb_ExternalProject_use_static_libraries,$(1),mariadb-connector-c)
262 endef
264 endif # SYSTEM_MARIADB_CONNECTOR_C
267 ifneq ($(SYSTEM_MARIADB_CONNECTOR_C),)
269 define gb_LinkTarget__use_mysql
271 $(call gb_LinkTarget_add_defs,$(1),\
272 -DSYSTEM_MARIADB \
275 $(call gb_LinkTarget_add_libs,$(1),\
276 $(MARIADB_LIBS) \
279 $(call gb_LinkTarget_set_include,$(1),\
280 $(MARIADB_CFLAGS) \
281 $$(INCLUDE) \
283 endef
285 else
287 define gb_LinkTarget__use_mysql
289 $(call gb_LinkTarget_set_include,$(1),\
290 $$(INCLUDE) \
293 endef
295 endif
297 ifneq ($(SYSTEM_MYSQL_CONNECTOR_CPP),)
299 define gb_LinkTarget__use_mysql-connector-cpp
300 $(call gb_LinkTarget_add_libs,$(1),\
301 -lmysqlcppconn \
304 $(call gb_LinkTarget_add_defs,$(1),\
305 -DSYSTEM_MYSQL_CPPCONN \
307 endef
309 else
311 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OXT,\
312 mysqlcppconn \
315 # note: this does not link mysqlcppconn, it is loaded via osl_loadModuleRelative
316 define gb_LinkTarget__use_mysql-connector-cpp
318 $(call gb_LinkTarget_use_unpacked,$(1),mysql-connector-cpp)
320 $(call gb_LinkTarget_add_defs,$(1),\
321 -DCPPCONN_LIB_BUILD \
324 $(call gb_LinkTarget_set_include,$(1),\
325 -I$(call gb_UnpackedTarball_get_dir,mysql-connector-cpp) \
326 -I$(call gb_UnpackedTarball_get_dir,mysql-connector-cpp)/cppconn \
327 $$(INCLUDE) \
330 endef
332 endif
334 ifneq ($(SYSTEM_ZLIB),)
336 define gb_LinkTarget__use_zlib
337 $(call gb_LinkTarget_add_defs,$(1),\
338 -DSYSTEM_ZLIB \
340 $(call gb_LinkTarget_add_libs,$(1),-lz)
342 endef
344 # nothing on system
345 define gb_LinkTarget__use_zlib_x64
347 endef
349 gb_ExternalProject__use_zlib :=
351 else # !SYSTEM_ZLIB
353 define gb_LinkTarget__use_zlib_multiarch
354 $(if $(2),,$(call gb_Output_error,gb_LinkTarget__use_zlib_multiarch needs two arguments))
356 $(call gb_LinkTarget_set_include,$(1),\
357 $(ZLIB_CFLAGS) \
358 $$(INCLUDE) \
361 $(call gb_LinkTarget_use_static_libraries,$(1),\
362 $(2) \
365 endef
367 define gb_LinkTarget__use_zlib
368 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib)
370 endef
372 define gb_LinkTarget__use_zlib_x64
373 $(call gb_LinkTarget__use_zlib_multiarch,$(1),zlib_x64)
375 endef
377 define gb_ExternalProject__use_zlib
378 $(call gb_ExternalProject_use_static_libraries,$(1),zlib)
380 endef
382 endif # SYSTEM_ZLIB
385 ifneq ($(SYSTEM_LIBJPEG),)
387 define gb_LinkTarget__use_libjpeg
388 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
389 $(call gb_LinkTarget_set_ldflags,$(1),\
390 $$(filter-out -L/usr/lib/jvm%,$$(T_LDFLAGS)) \
393 endef
395 gb_ExternalProject__use_libjpeg :=
397 else
399 define gb_LinkTarget__use_libjpeg
400 $(call gb_LinkTarget_set_include,$(1),\
401 $(LIBJPEG_CFLAGS) \
402 $$(INCLUDE) \
404 $(call gb_LinkTarget_add_libs,$(1),$(LIBJPEG_LIBS))
405 $(call gb_LinkTarget_use_external_project,$(1),libjpeg-turbo,full)
407 endef
409 define gb_ExternalProject__use_libjpeg
410 $(call gb_ExternalProject_use_external_project,$(1),libjpeg-turbo)
412 endef
414 endif # SYSTEM_LIBJPEG
416 ifneq ($(SYSTEM_MYTHES),)
418 define gb_LinkTarget__use_mythes
419 $(call gb_LinkTarget_set_include,$(1),\
420 $$(INCLUDE) \
421 $(MYTHES_CFLAGS) \
423 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
425 endef
427 else # !SYSTEM_MYTHES
429 define gb_LinkTarget__use_mythes
430 $(call gb_LinkTarget_set_include,$(1),\
431 -I$(call gb_UnpackedTarball_get_dir,mythes) \
432 $$(INCLUDE) \
435 ifeq ($(COM),MSC)
436 $(call gb_LinkTarget_use_static_libraries,$(1),\
437 mythes \
439 else
440 $(call gb_LinkTarget_add_libs,$(1),$(MYTHES_LIBS))
441 $(call gb_LinkTarget_use_external_project,$(1),mythes)
442 endif
444 endef
446 endif # SYSTEM_MYTHES
449 ifneq ($(SYSTEM_EXPAT),)
451 define gb_LinkTarget__use_expat_impl
452 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
454 $(call gb_LinkTarget_add_defs,$(1),\
455 -DSYSTEM_EXPAT \
458 $(call gb_LinkTarget_add_libs,$(1),-lexpat)
460 endef
462 gb_ExternalProject__use_expat :=
464 else # !SYSTEM_EXPAT
466 define gb_LinkTarget__use_expat_impl
467 $(if $(2),,$(error gb_LinkTarget__use_expat_impl needs additional parameter))
469 $(call gb_LinkTarget_set_include,$(1),\
470 -I$(call gb_UnpackedTarball_get_dir,expat)/lib \
471 $$(INCLUDE) \
474 $(call gb_LinkTarget_use_static_libraries,$(1),\
475 $(2) \
478 endef
480 define gb_ExternalProject__use_expat
481 $(call gb_ExternalProject_use_static_libraries,$(1),expat)
483 endef
485 endif # SYSTEM_EXPAT
487 define gb_LinkTarget__use_expat
488 $(call gb_LinkTarget__use_expat_impl,$(1),expat)
490 endef
492 define gb_LinkTarget__use_expat_x64
493 $(call gb_LinkTarget__use_expat_impl,$(1),expat_x64)
495 endef
497 ifneq ($(SYSTEM_HYPH),)
499 define gb_LinkTarget__use_hyphen
500 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
502 endef
504 else # !SYSTEM_HYPH
506 define gb_LinkTarget__use_hyphen
507 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
508 $(call gb_LinkTarget_set_include,$(1),\
509 -I$(call gb_UnpackedTarball_get_dir,hyphen)\
510 $$(INCLUDE) \
513 ifeq ($(COM),MSC)
514 $(call gb_LinkTarget_use_static_libraries,$(1),\
515 hyphen \
517 else
518 $(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
519 $(call gb_LinkTarget_use_external_project,$(1),hyphen)
520 endif
522 endef
524 endif # SYSTEM_HYPH
526 ifneq ($(SYSTEM_HUNSPELL),)
528 define gb_LinkTarget__use_hunspell
529 $(call gb_LinkTarget_set_include,$(1),\
530 $$(INCLUDE) \
531 $(HUNSPELL_CFLAGS) \
533 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
535 endef
537 gb_ExternalProject__use_hunspell :=
539 else # !SYSTEM_HUNSPELL
541 define gb_LinkTarget__use_hunspell
542 $(call gb_LinkTarget_add_defs,$(1),\
543 -DHUNSPELL_STATIC \
545 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
546 $(call gb_LinkTarget_set_include,$(1),\
547 -I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
548 $$(INCLUDE) \
551 ifeq ($(COM),MSC)
552 $(call gb_LinkTarget_use_static_libraries,$(1),\
553 hunspell \
555 else
556 $(call gb_LinkTarget_add_libs,$(1),$(HUNSPELL_LIBS))
557 $(call gb_LinkTarget_use_external_project,$(1),hunspell)
558 endif
560 endef
562 define gb_ExternalProject__use_hunspell
563 $(call gb_ExternalProject_use_external_project,$(1),hunspell)
565 endef
567 endif # SYSTEM_HUNSPELL
570 ifneq ($(SYSTEM_BOOST),)
572 define gb_LinkTarget__use_boost_lib
573 $(call gb_LinkTarget_set_include,$(1),\
574 $$(INCLUDE) \
575 $(BOOST_CPPFLAGS) \
578 $(call gb_LinkTarget_add_ldflags,$(1),\
579 $(BOOST_LDFLAGS) \
582 $(call gb_LinkTarget_add_libs,$(1),$(2))
584 endef
586 define gb_LinkTarget__use_boost_locale
587 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_LOCALE_LIB))
589 endef
591 define gb_LinkTarget__use_boost_date_time
592 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
594 endef
596 define gb_LinkTarget__use_boost_filesystem
597 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
599 endef
601 gb_ExternalProject__use_boost_filesystem :=
603 define gb_LinkTarget__use_boost_iostreams
604 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
606 endef
608 gb_ExternalProject__use_boost_iostreams :=
610 define gb_LinkTarget__use_boost_system
611 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
613 endef
615 gb_ExternalProject__use_boost_system :=
617 define gb_LinkTarget__use_boost_headers
618 $(call gb_LinkTarget_set_include,$(1),\
619 $$(INCLUDE) \
620 $(BOOST_CPPFLAGS) \
623 endef
625 gb_ExternalProject__use_boost_headers:=
627 else # !SYSTEM_BOOST
629 define gb_LinkTarget__use_boost_lib
630 $(call gb_LinkTarget_add_defs,$(1),\
631 -DBOOST_ALL_NO_LIB \
634 $(call gb_LinkTarget_use_static_libraries,$(1),$(2))
636 endef
638 define gb_LinkTarget__use_boost_locale
639 $(call gb_LinkTarget__use_boost_lib,$(1),boost_locale)
640 $(call gb_LinkTarget_add_libs,$(1),\
641 $(if $(filter $(OS),MACOSX),-liconv) \
644 endef
646 define gb_LinkTarget__use_boost_date_time
647 $(call gb_LinkTarget__use_boost_lib,$(1),boost_date_time)
649 endef
651 define gb_LinkTarget__use_boost_filesystem
652 $(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
654 endef
656 define gb_ExternalProject__use_boost_filesystem
657 $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
658 endef
660 define gb_LinkTarget__use_boost_iostreams
661 $(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
663 endef
665 define gb_ExternalProject__use_boost_iostreams
666 $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
667 endef
669 define gb_LinkTarget__use_boost_system
670 $(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
672 endef
674 define gb_ExternalProject__use_boost_system
675 $(call gb_ExternalProject_use_static_libraries,$(1),boost_system)
676 endef
678 define gb_LinkTarget__use_boost_headers
679 $(call gb_LinkTarget_use_unpacked,$(1),boost)
680 $(call gb_LinkTarget_set_include,$(1),\
681 $(BOOST_CPPFLAGS) \
682 $$(INCLUDE) \
685 endef
687 define gb_ExternalProject__use_boost_headers
688 $(call gb_ExternalProject_use_unpacked,$(1),boost)
690 endef
692 endif # SYSTEM_BOOST
695 ifneq ($(SYSTEM_LIBCMIS),)
697 define gb_LinkTarget__use_libcmis
698 $(call gb_LinkTarget_set_include,$(1),\
699 $$(INCLUDE) \
700 $(LIBCMIS_CFLAGS) \
702 $(call gb_LinkTarget_add_libs,$(1),$(LIBCMIS_LIBS))
704 endef
706 else # !SYSTEM_LIBCMIS
708 define gb_LinkTarget__use_libcmis
709 $(call gb_LinkTarget_set_include,$(1),\
710 -I$(call gb_UnpackedTarball_get_dir,libcmis)/src \
711 $$(INCLUDE) \
713 $(call gb_LinkTarget_use_static_libraries,$(1),\
714 libcmis \
717 endef
719 endif # SYSTEM_LIBCMIS
721 ifeq ($(ENABLE_JAVA),TRUE)
723 define gb_LinkTarget__use_jawt
724 $(call gb_LinkTarget_add_libs,$(1),\
725 $(JAWTLIB) \
728 endef
730 else # !ENABLE_JAVA
732 gb_LinkTarget__use_jawt :=
734 endif # ENABLE_JAVA
736 ifneq ($(SYSTEM_LIBATOMIC_OPS),)
738 define gb_LinkTarget__use_libatomic_ops
739 $(call gb_LinkTarget_set_include,$(1),\
740 $$(INCLUDE) \
741 $(LIBATOMIC_OPS_CFLAGS) \
743 $(call gb_LinkTarget_add_libs,$(1), $(LIBATOMIC_OPS_LIBS))
745 endef
746 gb_ExternalProject__use_libatomic_ops :=
748 else # !SYSTEM_LIBATOMIC_OPS
750 define gb_LinkTarget__use_libatomic_ops
751 $(call gb_LinkTarget_set_include,$(1),\
752 $(LIBATOMIC_OPS_CFLAGS) \
753 $$(INCLUDE) \
754 $(LIBATOMIC_OPS_CFLAGS) \
756 $(call gb_LinkTarget_use_external_project,$(1),\
757 libatomic_ops \
760 $(call gb_LinkTarget_add_libs,$(1),\
761 -L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
764 endef
766 define gb_ExternalProject__use_libatomic_ops
767 $(call gb_ExternalProject_use_external_project,$(1),libatomic_ops)
769 endef
771 endif # SYSTEM_LIBATOMIC_OPS
774 ifneq ($(SYSTEM_LIBEXTTEXTCAT),)
776 define gb_LinkTarget__use_libexttextcat
777 $(call gb_LinkTarget_set_include,$(1),\
778 $$(INCLUDE) \
779 $(LIBEXTTEXTCAT_CFLAGS) \
781 $(call gb_LinkTarget_add_defs,$(1),\
782 -DSYSTEM_LIBEXTTEXTCAT \
784 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXTTEXTCAT_LIBS))
786 endef
788 else # !SYSTEM_LIBEXTTEXTCAT
790 define gb_LinkTarget__use_libexttextcat
791 $(call gb_LinkTarget_set_include,$(1),\
792 -I$(call gb_UnpackedTarball_get_dir,libexttextcat/src) \
793 $$(INCLUDE) \
796 ifeq ($(COM),MSC)
797 $(call gb_LinkTarget_use_static_libraries,$(1),\
798 libexttextcat \
800 else
801 $(call gb_LinkTarget_add_libs,$(1),\
802 $(call gb_UnpackedTarball_get_dir,libexttextcat)/src/.libs/libexttextcat-2.0.a\
804 $(call gb_LinkTarget_use_external_project,$(1),libexttextcat)
805 endif
808 endef
810 endif # SYSTEM_LIBEXTTEXTCAT
813 ifneq ($(SYSTEM_LIBNUMBERTEXT),)
815 define gb_LinkTarget__use_libnumbertext
816 $(call gb_LinkTarget_set_include,$(1),\
817 $$(INCLUDE) \
818 $(LIBNUMBERTEXT_CFLAGS) \
820 $(call gb_LinkTarget_add_defs,$(1),\
821 -DSYSTEM_LIBNUMBERTEXT \
823 $(call gb_LinkTarget_add_libs,$(1),$(LIBNUMBERTEXT_LIBS))
825 endef
827 else # !SYSTEM_LIBNUMBERTEXT
829 ifneq ($(ENABLE_LIBNUMBERTEXT),)
831 define gb_LinkTarget__use_libnumbertext
832 $(call gb_LinkTarget_use_package,$(1),libnumbertext_numbertext)
833 $(call gb_LinkTarget_set_include,$(1),\
834 -I$(call gb_UnpackedTarball_get_dir,libnumbertext/src) \
835 $$(INCLUDE) \
837 $(call gb_LinkTarget_add_defs,$(1),\
838 -DENABLE_LIBNUMBERTEXT \
841 ifeq ($(COM),MSC)
842 $(call gb_LinkTarget_use_static_libraries,$(1),\
843 libnumbertext \
845 else
847 $(call gb_LinkTarget_add_libs,$(1),\
848 $(call gb_UnpackedTarball_get_dir,libnumbertext)/src/.libs/libnumbertext-1.0.a\
850 $(call gb_LinkTarget_use_external_project,$(1),libnumbertext,full)
852 endif
854 endef
856 else # !ENABLE_LIBNUMBERTEXT
858 define gb_LinkTarget__use_libnumbertext
859 endef
861 endif # ENABLE_LIBNUMBERTEXT
863 endif # SYSTEM_LIBNUMBERTEXT
866 ifneq ($(SYSTEM_LIBXML),)
868 define gb_LinkTarget__use_libxml2
869 $(call gb_LinkTarget_add_defs,$(1),\
870 -DSYSTEM_LIBXML \
872 $(call gb_LinkTarget_set_include,$(1),\
873 $$(INCLUDE) \
874 $(LIBXML_CFLAGS) \
876 $(call gb_LinkTarget_add_libs,$(1),$(LIBXML_LIBS))
878 endef
879 gb_ExternalProject__use_libxml2:=
881 else # !SYSTEM_LIBXML
883 $(eval $(call gb_Helper_register_packages_for_install,ure,\
884 libxml2 \
887 define gb_LinkTarget__use_libxml2
888 $(call gb_LinkTarget_use_package,$(1),libxml2)
889 $(call gb_LinkTarget_set_include,$(1),\
890 $$(INCLUDE) \
891 $(LIBXML_CFLAGS) \
894 $(call gb_LinkTarget_add_libs,$(1),\
895 $(LIBXML_LIBS) \
898 ifeq ($(COM),MSC)
899 $(call gb_LinkTarget_use_external,$(1),icu_headers)
900 endif
902 endef
903 define gb_ExternalProject__use_libxml2
904 $(call gb_ExternalProject_use_package,$(1),libxml2)
906 ifeq ($(COM),MSC)
907 $(call gb_ExternalProject_use_packages,$(1),icu icu_ure)
908 endif
910 endef
912 endif # SYSTEM_LIBXML
915 ifneq ($(SYSTEM_LIBXSLT),)
917 define gb_LinkTarget__use_libxslt
918 $(call gb_LinkTarget_set_include,$(1),\
919 $$(INCLUDE) \
920 $(LIBXSLT_CFLAGS) \
922 $(call gb_LinkTarget_add_libs,$(1),$(LIBXSLT_LIBS))
924 endef
926 define gb_LinkTarget__use_libexslt
927 $(call gb_LinkTarget_set_include,$(1),\
928 $$(INCLUDE) \
929 $(LIBEXSLT_CFLAGS) \
932 $(call gb_LinkTarget_add_libs,$(1),$(LIBEXSLT_LIBS))
934 endef
936 else # !SYSTEM_LIBXSLT
938 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
939 libxslt \
942 define gb_LinkTarget__use_libxslt
943 $(call gb_LinkTarget_use_package,$(1),libxslt)
944 $(call gb_LinkTarget_set_include,$(1),\
945 $$(INCLUDE) \
946 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
949 ifeq ($(COM),MSC)
950 $(call gb_LinkTarget_add_libs,$(1),\
951 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libxslt.lib \
953 else
954 $(call gb_LinkTarget_add_libs,$(1),\
955 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libxslt/.libs -lxslt \
957 endif
959 endef
961 define gb_LinkTarget__use_libexslt
962 $(call gb_LinkTarget_use_package,$(1),libxslt)
963 $(call gb_LinkTarget_set_include,$(1),\
964 $$(INCLUDE) \
965 -I$(call gb_UnpackedTarball_get_dir,libxslt) \
968 ifeq ($(COM),MSC)
969 $(call gb_LinkTarget_add_libs,$(1),\
970 $(call gb_UnpackedTarball_get_dir,libxslt)/win32/bin.msvc/libexslt.lib \
972 else
973 $(call gb_LinkTarget_add_libs,$(1),\
974 -L$(call gb_UnpackedTarball_get_dir,libxslt)/libexslt/.libs -lexslt \
976 endif
978 endef
980 endif # SYSTEM_LIBXSLT
983 ifneq ($(SYSTEM_XMLSEC),)
985 define gb_LinkTarget__use_xmlsec
986 $(call gb_LinkTarget_add_defs,$(1),\
987 -DSYSTEM_XMLSEC \
989 $(call gb_LinkTarget_set_include,$(1),\
990 $$(INCLUDE) \
991 $(XMLSEC_CFLAGS) \
993 $(call gb_LinkTarget_add_libs,$(1),$(XMLSEC_LIBS))
995 endef
997 gb_ExternalProject__use_xmlsec:=
999 else # !SYSTEM_XMLSEC
1001 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1002 xmlsec \
1005 define gb_LinkTarget__use_xmlsec
1007 endef
1009 endif # SYSTEM_XMLSEC
1011 ifneq ($(SYSTEM_LIBLANGTAG),)
1013 define gb_LinkTarget__use_liblangtag
1014 $(call gb_LinkTarget_set_include,$(1),\
1015 $$(INCLUDE) \
1016 $(LIBLANGTAG_CFLAGS) \
1019 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1021 endef
1023 gb_ExternalProject__use_liblangtag :=
1025 else # !SYSTEM_LIBLANGTAG
1027 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1028 liblangtag_data \
1031 ifeq ($(COM),MSC)
1033 define gb_LinkTarget__use_liblangtag
1034 $(call gb_LinkTarget_set_include,$(1),\
1035 $(LIBLANGTAG_CFLAGS) \
1036 $$(INCLUDE) \
1038 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1039 $(call gb_LinkTarget_use_external_project,$(1),liblangtag)
1041 endef
1043 else
1045 $(eval $(call gb_Helper_register_packages_for_install,ure,\
1046 liblangtag \
1049 define gb_LinkTarget__use_liblangtag
1050 $(call gb_LinkTarget_set_include,$(1),\
1051 $(LIBLANGTAG_CFLAGS) \
1052 $$(INCLUDE) \
1054 $(call gb_LinkTarget_add_libs,$(1),$(LIBLANGTAG_LIBS))
1055 $(call gb_LinkTarget_use_package,$(1),liblangtag)
1057 endef
1059 endif # MSC
1061 define gb_ExternalProject__use_liblangtag
1062 $(call gb_ExternalProject_use_external_project,$(1),liblangtag)
1064 endef
1066 endif # SYSTEM_LIBLANGTAG
1069 gb_ExternalProject__use_apr :=
1071 ifeq ($(WITH_WEBDAV),serf)
1073 define gb_LinkTarget__use_apr
1074 $(call gb_LinkTarget_set_include,$(1),\
1075 $$(INCLUDE) \
1076 $(APR_CFLAGS) \
1078 $(call gb_LinkTarget_add_libs,$(1),\
1079 $(APR_LIBS) \
1080 $(if $(filter $(OS),LINUX),-lpthread) \
1081 $(if $(filter $(OS),MACOSX),-liconv) \
1084 ifeq ($(SYSTEM_APR),)
1085 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
1086 mswsock \
1087 rpcrt4 \
1088 shell32 \
1090 $(call gb_LinkTarget_add_defs,$(1),\
1091 -DAPR_DECLARE_STATIC \
1092 -DAPU_DECLARE_STATIC \
1094 $(call gb_LinkTarget_use_external_project,$(1),apr_util)
1095 endif
1097 endef
1099 define gb_ExternalProject__use_apr
1100 ifeq ($(SYSTEM_APR),)
1101 $(call gb_ExternalProject_use_external_project,$(1),apr_util)
1102 endif
1104 endef
1106 define gb_LinkTarget__use_serf
1107 $(call gb_LinkTarget_set_include,$(1),\
1108 $(SERF_CFLAGS) \
1109 $$(INCLUDE) \
1111 $(call gb_LinkTarget_add_libs,$(1),\
1112 $(SERF_LIBS) \
1115 ifeq ($(SYSTEM_SERF),)
1116 $(call gb_LinkTarget_use_external_project,$(1),serf)
1117 endif
1119 endef
1121 else ifeq ($(WITH_WEBDAV),neon)
1123 ifneq ($(SYSTEM_NEON),)
1125 define gb_LinkTarget__use_neon
1126 $(call gb_LinkTarget_add_defs,$(1),\
1127 -DNEON_VERSION=0x$(NEON_VERSION) \
1128 -DSYSTEM_NEON \
1130 $(call gb_LinkTarget_set_include,$(1),\
1131 $$(INCLUDE) \
1132 $(NEON_CFLAGS) \
1135 $(call gb_LinkTarget_add_libs,$(1),$(NEON_LIBS))
1137 endef
1139 else # !SYSTEM_NEON
1141 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1142 neon \
1145 define gb_LinkTarget__use_neon
1146 $(call gb_LinkTarget_use_unpacked,$(1),neon)
1147 $(call gb_LinkTarget_set_include,$(1),\
1148 -I$(call gb_UnpackedTarball_get_dir,neon/src) \
1149 $$(INCLUDE) \
1151 $(call gb_LinkTarget_use_libraries,$(1),\
1152 neon \
1155 endef
1157 endif # SYSTEM_NEON
1159 endif # WITH_WEBDAV
1161 ifneq ($(SYSTEM_REDLAND),)
1163 define gb_LinkTarget__use_librdf
1164 $(call gb_LinkTarget_add_defs,$(1),\
1165 -DSYSTEM_REDLAND \
1167 $(call gb_LinkTarget_set_include,$(1),\
1168 $$(INCLUDE) \
1169 $(REDLAND_CFLAGS) \
1171 $(call gb_LinkTarget_add_libs,$(1),$(REDLAND_LIBS))
1173 endef
1175 gb_LinkTarget__use_redland_headers:=
1177 gb_LinkTarget__use_raptor_headers:=
1179 gb_LinkTarget__use_rasqal_headers:=
1181 else # !SYSTEM_REDLAND
1183 define gb_LinkTarget__use_redland_headers
1184 $(call gb_LinkTarget_set_include,$(1),\
1185 -I$(call gb_UnpackedTarball_get_dir,redland)/src \
1186 $$(INCLUDE) \
1189 endef
1191 define gb_LinkTarget__use_raptor_headers
1192 $(call gb_LinkTarget_set_include,$(1),\
1193 -I$(call gb_UnpackedTarball_get_dir,raptor)/src \
1194 $$(INCLUDE) \
1197 endef
1199 define gb_LinkTarget__use_rasqal_headers
1200 $(call gb_LinkTarget_set_include,$(1),\
1201 -I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
1202 $$(INCLUDE) \
1205 endef
1207 ifneq ($(OS),ANDROID)
1209 ifeq ($(COM),MSC)
1210 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
1211 raptor2 \
1212 rasqal \
1213 rdf \
1215 else
1216 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1217 raptor \
1218 rasqal \
1219 redland \
1221 endif
1223 define gb_LinkTarget__use_librdf
1224 ifeq ($(COM),MSC)
1225 $(call gb_LinkTarget_use_libraries,$(1),\
1226 raptor2 \
1227 rdf \
1229 else
1230 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1232 $(call gb_LinkTarget_add_libs,$(1),\
1233 -L$(call gb_UnpackedTarball_get_dir,redland)/src/.libs -lrdf \
1234 -L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 \
1235 -L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal \
1237 endif
1239 endef
1241 else # ANDROID
1243 define gb_LinkTarget__use_librdf
1244 $(call gb_LinkTarget_use_packages,$(1),redland raptor rasqal)
1246 endef
1248 endif # ANDROID
1250 endif # SYSTEM_REDLAND
1253 ifneq ($(USING_X11)$(ENABLE_CAIRO_CANVAS)$(ENABLE_HEADLESS),) # or
1255 ifneq ($(SYSTEM_CAIRO),)
1257 define gb_LinkTarget__use_cairo
1258 $(call gb_LinkTarget_set_include,$(1),\
1259 $$(INCLUDE) \
1260 $(CAIRO_CFLAGS) \
1262 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1263 $(call gb_LinkTarget_add_libs,$(1),$(CAIRO_LIBS))
1265 endef
1267 else # !SYSTEM_CAIRO
1269 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
1270 cairo \
1271 $(if $(filter $(OS),WNT),,pixman) \
1274 define gb_LinkTarget__use_cairo
1275 $(call gb_LinkTarget_use_package,$(1),cairo)
1276 $(call gb_LinkTarget_use_package,$(1),pixman)
1277 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1278 $(call gb_LinkTarget_set_include,$(1),\
1279 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1280 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1281 $$(INCLUDE) \
1283 $(call gb_LinkTarget_add_libs,$(1),\
1284 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1285 $(if $(filter-out MACOSX WNT,$(OS)), \
1286 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1290 endef
1292 endif # SYSTEM_CAIRO
1294 else ifeq ($(OS),ANDROID)
1296 define gb_LinkTarget__use_cairo
1297 $(call gb_LinkTarget_use_package,$(1),cairo)
1298 $(call gb_LinkTarget_use_package,$(1),pixman)
1299 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1300 $(call gb_LinkTarget_set_include,$(1),\
1301 -I$(call gb_UnpackedTarball_get_dir,cairo) \
1302 -I$(call gb_UnpackedTarball_get_dir,cairo)/src \
1303 $$(INCLUDE) \
1305 $(call gb_LinkTarget_add_libs,$(1),\
1306 -L$(call gb_UnpackedTarball_get_dir,cairo)/src/.libs -lcairo \
1307 -L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
1310 endef
1312 endif # CAIRO
1314 ifneq ($(SYSTEM_FREETYPE),)
1316 define gb_LinkTarget__use_freetype_headers
1317 $(call gb_LinkTarget_set_include,$(1),\
1318 $$(INCLUDE) \
1319 $(FREETYPE_CFLAGS) \
1322 endef
1324 gb_ExternalProject__use_freetype :=
1326 else
1328 define gb_LinkTarget__use_freetype_headers
1329 $(call gb_LinkTarget_use_external_project,$(1),freetype)
1330 $(call gb_LinkTarget_set_include,$(1),\
1331 $(FREETYPE_CFLAGS) \
1332 $$(INCLUDE) \
1335 endef
1337 define gb_ExternalProject__use_freetype
1338 $(call gb_ExternalProject_use_external_project,$(1),freetype)
1340 endef
1342 endif # SYSTEM_FREETYPE
1344 define gb_LinkTarget__use_freetype
1345 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
1346 $(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
1348 endef
1350 ifneq ($(SYSTEM_FONTCONFIG),)
1352 define gb_LinkTarget__use_fontconfig
1353 $(call gb_LinkTarget_set_include,$(1),\
1354 $$(INCLUDE) \
1355 $(FONTCONFIG_CFLAGS) \
1358 $(call gb_LinkTarget_add_libs,$(1),$(FONTCONFIG_LIBS))
1360 endef
1362 else
1364 define gb_LinkTarget__use_fontconfig
1365 $(call gb_LinkTarget_use_external_project,$(1),fontconfig)
1366 $(call gb_LinkTarget_set_include,$(1),\
1367 -I$(call gb_UnpackedTarball_get_dir,fontconfig) \
1368 $$(INCLUDE) \
1371 $(call gb_LinkTarget_add_libs,$(1),\
1372 -L$(call gb_UnpackedTarball_get_dir,fontconfig)/src/.libs -lfontconfig \
1375 endef
1377 endif # SYSTEM_FONTCONFIG
1379 ifneq ($(SYSTEM_GRAPHITE),)
1381 define gb_LinkTarget__use_graphite
1382 $(call gb_LinkTarget_set_include,$(1),\
1383 $$(INCLUDE) \
1384 $(GRAPHITE_CFLAGS) \
1386 $(call gb_LinkTarget_add_libs,$(1),$(GRAPHITE_LIBS))
1388 endef
1390 gb_ExternalProject__use_graphite:=
1392 else # !SYSTEM_GRAPHITE
1394 define gb_LinkTarget__use_graphite
1395 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
1396 $(call gb_LinkTarget_set_include,$(1),\
1397 -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
1398 $$(INCLUDE) \
1400 $(call gb_LinkTarget_use_static_libraries,$(1),\
1401 graphite \
1404 endef
1406 define gb_ExternalProject__use_graphite
1407 $(call gb_ExternalProject_use_static_libraries,$(1),\
1408 graphite \
1411 endef
1412 endif # SYSTEM_GRAPHITE
1414 ifneq ($(SYSTEM_ICU),)
1416 gb_LinkTarget__use_icu_headers:=
1417 gb_ExternalProject__use_icu:=
1419 define gb_LinkTarget__use_icudata
1420 $(call gb_LinkTarget_add_libs,$(1),-licudata)
1422 endef
1423 define gb_LinkTarget__use_icui18n
1424 $(call gb_LinkTarget_add_libs,$(1),-licui18n)
1426 endef
1427 define gb_LinkTarget__use_icuuc
1428 $(call gb_LinkTarget_add_libs,$(1),-licuuc)
1430 endef
1432 else # !SYSTEM_ICU
1434 $(eval $(call gb_Helper_register_packages_for_install,ure, \
1435 icu_ure \
1438 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1439 icu \
1442 ifeq ($(OS)$(DISABLE_DYNLOADING),ANDROID)
1443 gb_ICU_suffix:=lo
1444 else
1445 gb_ICU_suffix:=
1446 endif
1448 define gb_LinkTarget__use_icu_headers
1449 $(call gb_LinkTarget_use_unpacked,$(1),icu)
1450 $(call gb_LinkTarget_set_include,$(1),\
1451 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
1452 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
1453 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
1454 $$(INCLUDE) \
1457 endef
1459 define gb_ExternalProject__use_icu
1460 $(call gb_ExternalProject_use_package,$(1),icu)
1462 endef
1464 # icudata and icui18n is called icudt and icuin when built with MSVC :-/
1465 define gb_LinkTarget__use_icudata
1466 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1468 ifeq ($(OS),WNT)
1469 $(call gb_LinkTarget_add_libs,$(1),\
1470 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icudt$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1472 else
1473 $(call gb_LinkTarget_add_libs,$(1),\
1474 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licudata$(gb_ICU_suffix) \
1476 endif
1478 endef
1480 define gb_LinkTarget__use_icui18n
1481 $(call gb_LinkTarget_use_package,$(1),icu)
1483 ifeq ($(OS),WNT)
1484 $(call gb_LinkTarget_add_libs,$(1),\
1485 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuin$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1487 else
1488 $(call gb_LinkTarget_add_libs,$(1),\
1489 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licui18n$(gb_ICU_suffix) \
1491 endif
1493 endef
1495 define gb_LinkTarget__use_icuuc
1496 $(call gb_LinkTarget_use_package,$(1),icu_ure)
1498 ifeq ($(OS),WNT)
1499 $(call gb_LinkTarget_add_libs,$(1),\
1500 $(call gb_UnpackedTarball_get_dir,icu)/source/lib/icuuc$(if $(MSVC_USE_DEBUG_RUNTIME),d).lib \
1502 else
1503 $(call gb_LinkTarget_add_libs,$(1),\
1504 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib -licuuc$(gb_ICU_suffix) \
1506 endif
1508 endef
1510 endif # SYSTEM_ICU
1512 ifneq ($(SYSTEM_HARFBUZZ),)
1514 define gb_LinkTarget__use_harfbuzz
1515 $(call gb_LinkTarget_set_include,$(1),\
1516 $$(INCLUDE) \
1517 $(HARFBUZZ_CFLAGS) \
1519 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1521 endef
1523 gb_ExternalProject__use_harfbuzz :=
1525 else # SYSTEM_HARFBUZZ != TRUE
1527 define gb_LinkTarget__use_harfbuzz
1528 $(call gb_LinkTarget_set_include,$(1),\
1529 $(HARFBUZZ_CFLAGS) \
1530 $$(INCLUDE) \
1532 $(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
1533 $(call gb_LinkTarget_use_external_project,$(1),harfbuzz)
1535 endef
1537 define gb_ExternalProject__use_harfbuzz
1538 $(call gb_ExternalProject_use_external_project,$(1),harfbuzz)
1540 endef
1542 endif # SYSTEM_HARFBUZZ
1544 ifeq ($(DISABLE_OPENSSL),TRUE)
1546 gb_ExternalProject__use_openssl:=
1547 gb_LinkTarget__use_openssl_headers:=
1548 gb_LinkTarget__use_openssl:=
1550 else # !DISABLE_OPENSSL
1552 ifneq ($(SYSTEM_OPENSSL),)
1554 gb_LinkTarget__use_openssl_headers:=
1555 gb_ExternalProject__use_openssl:=
1557 define gb_LinkTarget__use_openssl
1558 $(call gb_LinkTarget_set_include,$(1),\
1559 $$(INCLUDE) \
1560 $(OPENSSL_CFLAGS) \
1562 $(call gb_LinkTarget_add_libs,$(1),$(OPENSSL_LIBS))
1564 endef
1566 else # !SYSTEM_OPENSSL
1568 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1569 openssl \
1572 define gb_ExternalProject__use_openssl
1573 $(call gb_ExternalProject_use_package,$(1),openssl)
1575 endef
1577 define gb_LinkTarget__use_openssl_headers
1578 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1579 $(call gb_LinkTarget_set_include,$(1),\
1580 -I$(call gb_UnpackedTarball_get_dir,openssl)/include \
1581 $$(INCLUDE) \
1584 endef
1586 define gb_LinkTarget__use_openssl
1587 $(call gb_LinkTarget_use_package,$(1),openssl)
1588 ifeq ($(OS),WNT)
1589 $(call gb_LinkTarget_add_libs,$(1),\
1590 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
1591 $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
1593 else
1594 $(call gb_LinkTarget_add_libs,$(1),\
1595 $(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
1596 $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
1598 $(call gb_LinkTarget_use_external_project,$(1),openssl)
1599 ifeq ($(OS),SOLARIS)
1600 $(call gb_LinkTarget_add_libs,$(1),\
1601 -lnsl \
1602 -lsocket \
1604 endif
1605 endif
1607 endef
1609 endif # SYSTEM_OPENSSL
1610 endif # DISABLE_OPENSSL
1613 ifeq ($(DISABLE_OPENSSL),TRUE)
1615 define gb_LinkTarget__use_gnutls
1616 $(call gb_LinkTarget_set_include,$(1),\
1617 $$(INCLUDE) \
1618 $(GNUTLS_CFLAGS) \
1621 $(call gb_LinkTarget_add_defs,$(1),\
1622 -DDISABLE_OPENSSL \
1625 $(call gb_LinkTarget_add_libs,$(1),$(GNUTLS_LIBS))
1627 endef
1629 define gb_LinkTarget__use_libgcrypt
1630 $(call gb_LinkTarget_set_include,$(1),\
1631 $$(INCLUDE) \
1632 $(LIBGCRYPT_CFLAGS) \
1635 $(call gb_LinkTarget_add_libs,$(1),$(LIBGCRYPT_LIBS))
1637 endef
1639 else # !DISABLE_OPENSSL
1641 gb_LinkTarget__use_gnutls:=
1642 gb_LinkTarget__use_libgcrypt:=
1644 endif # DISABLE_OPENSSL
1647 ifneq ($(SYSTEM_CDR),)
1649 define gb_LinkTarget__use_cdr
1650 $(call gb_LinkTarget_set_include,$(1),\
1651 $$(INCLUDE) \
1652 $(CDR_CFLAGS) \
1654 $(call gb_LinkTarget_add_libs,$(1),$(CDR_LIBS))
1656 endef
1658 else # !SYSTEM_CDR
1660 define gb_LinkTarget__use_cdr
1661 $(call gb_LinkTarget_set_include,$(1),\
1662 -I$(call gb_UnpackedTarball_get_dir,libcdr)/inc \
1663 $$(INCLUDE) \
1665 $(call gb_LinkTarget_add_libs,$(1),\
1666 $(call gb_UnpackedTarball_get_dir,libcdr)/src/lib/.libs/libcdr-0.1$(gb_StaticLibrary_PLAINEXT) \
1668 $(call gb_LinkTarget_use_external_project,$(1),libcdr)
1669 endef
1671 endif # SYSTEM_CDR
1674 ifneq ($(SYSTEM_EBOOK),)
1676 define gb_LinkTarget__use_ebook
1677 $(call gb_LinkTarget_set_include,$(1),\
1678 $$(INCLUDE) \
1679 $(EBOOK_CFLAGS) \
1681 $(call gb_LinkTarget_add_libs,$(1),$(EBOOK_LIBS))
1683 endef
1685 gb_ExternalProject__use_ebook :=
1687 else # !SYSTEM_EBOOK
1689 define gb_LinkTarget__use_ebook
1690 $(call gb_LinkTarget_set_include,$(1),\
1691 -I${WORKDIR}/UnpackedTarball/libebook/inc \
1692 $$(INCLUDE) \
1694 $(call gb_LinkTarget_add_libs,$(1),\
1695 $(call gb_UnpackedTarball_get_dir,libebook)/src/lib/.libs/libe-book-0.1$(gb_StaticLibrary_PLAINEXT) \
1697 $(call gb_LinkTarget_use_external_project,$(1),libebook)
1699 endef
1701 define gb_ExternalProject__use_ebook
1702 $(call gb_ExternalProject_use_external_project,$(1),libebook)
1704 endef
1706 endif # SYSTEM_EBOOK
1709 ifneq ($(SYSTEM_ETONYEK),)
1711 define gb_LinkTarget__use_etonyek
1712 $(call gb_LinkTarget_set_include,$(1),\
1713 $$(INCLUDE) \
1714 $(ETONYEK_CFLAGS) \
1716 $(call gb_LinkTarget_add_libs,$(1),$(ETONYEK_LIBS))
1718 endef
1720 gb_ExternalProject__use_etonyek :=
1722 else # !SYSTEM_ETONYEK
1724 ifeq ($(COM),MSC)
1726 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1727 etonyek \
1730 define gb_LinkTarget__use_etonyek
1731 $(call gb_LinkTarget_set_include,$(1),\
1732 -I$(call gb_UnpackedTarball_get_dir,libetonyek)/inc \
1733 $$(INCLUDE) \
1735 $(call gb_LinkTarget_use_libraries,$(1),\
1736 etonyek \
1739 endef
1741 else # !MSC
1743 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1744 libetonyek \
1747 define gb_LinkTarget__use_etonyek
1748 $(call gb_LinkTarget_use_package,$(1),libetonyek)
1750 $(call gb_LinkTarget_set_include,$(1),\
1751 -I${WORKDIR}/UnpackedTarball/libetonyek/inc \
1752 -DLIBETONYEK_VISIBILITY \
1753 $$(INCLUDE) \
1755 $(call gb_LinkTarget_add_libs,$(1),\
1756 -L$(call gb_UnpackedTarball_get_dir,libetonyek)/src/lib/.libs -letonyek-0.1 \
1758 $(call gb_LinkTarget_use_external_project,$(1),libetonyek)
1760 endef
1762 define gb_ExternalProject__use_etonyek
1763 $(call gb_ExternalProject_use_external_project,$(1),libetonyek)
1765 endef
1767 endif
1769 endif # SYSTEM_ETONYEK
1772 ifneq ($(SYSTEM_FREEHAND),)
1774 define gb_LinkTarget__use_freehand
1775 $(call gb_LinkTarget_set_include,$(1),\
1776 $$(INCLUDE) \
1777 $(FREEHAND_CFLAGS) \
1779 $(call gb_LinkTarget_add_libs,$(1),$(FREEHAND_LIBS))
1781 endef
1783 gb_ExternalProject__use_freehand :=
1785 else # !SYSTEM_FREEHAND
1787 define gb_LinkTarget__use_freehand
1788 $(call gb_LinkTarget_set_include,$(1),\
1789 -I${WORKDIR}/UnpackedTarball/libfreehand/inc \
1790 $$(INCLUDE) \
1792 $(call gb_LinkTarget_add_libs,$(1),\
1793 $(call gb_UnpackedTarball_get_dir,libfreehand)/src/lib/.libs/libfreehand-0.1$(gb_StaticLibrary_PLAINEXT) \
1795 $(call gb_LinkTarget_use_external_project,$(1),libfreehand)
1797 endef
1799 define gb_ExternalProject__use_freehand
1800 $(call gb_ExternalProject_use_external_project,$(1),libfreehand)
1802 endef
1804 endif # SYSTEM_FREEHAND
1807 ifneq ($(SYSTEM_ODFGEN),)
1809 define gb_LinkTarget__use_odfgen
1810 $(call gb_LinkTarget_set_include,$(1),\
1811 $$(INCLUDE) \
1812 $(ODFGEN_CFLAGS) \
1814 $(call gb_LinkTarget_add_libs,$(1),$(ODFGEN_LIBS))
1816 endef
1818 else # !SYSTEM_ODFGEN
1820 ifeq ($(COM),MSC)
1822 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1823 odfgen \
1826 define gb_LinkTarget__use_odfgen
1827 $(call gb_LinkTarget_set_include,$(1),\
1828 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1829 $$(INCLUDE) \
1831 $(call gb_LinkTarget_use_libraries,$(1),\
1832 odfgen \
1835 endef
1837 else # !MSC
1839 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1840 libodfgen \
1843 define gb_LinkTarget__use_odfgen
1844 $(call gb_LinkTarget_use_package,$(1),libodfgen)
1846 $(call gb_LinkTarget_set_include,$(1),\
1847 -I$(call gb_UnpackedTarball_get_dir,libodfgen)/inc \
1848 -DLIBODFGEN_VISIBILITY \
1849 $$(INCLUDE) \
1851 $(call gb_LinkTarget_add_libs,$(1),\
1852 -L$(call gb_UnpackedTarball_get_dir,libodfgen)/src/.libs -lodfgen-0.1 \
1855 endef
1857 endif
1859 endif # SYSTEM_ODFGEN
1861 ifneq ($(SYSTEM_EPUBGEN),)
1863 define gb_LinkTarget__use_epubgen
1864 $(call gb_LinkTarget_set_include,$(1),\
1865 $$(INCLUDE) \
1866 $(EPUBGEN_CFLAGS) \
1868 $(call gb_LinkTarget_add_libs,$(1),$(EPUBGEN_LIBS))
1870 endef
1871 gb_ExternalProject__use_epubgen :=
1873 else # !SYSTEM_EPUBGEN
1875 define gb_LinkTarget__use_epubgen
1876 $(call gb_LinkTarget_set_include,$(1),\
1877 -I$(call gb_UnpackedTarball_get_dir,libepubgen)/inc \
1878 $$(INCLUDE) \
1880 $(call gb_LinkTarget_add_libs,$(1),\
1881 $(call gb_UnpackedTarball_get_dir,libepubgen)/src/lib/.libs/libepubgen-0.1$(gb_StaticLibrary_PLAINEXT) \
1883 $(call gb_LinkTarget_use_external_project,$(1),libepubgen)
1885 endef
1886 define gb_ExternalProject__use_epubgen
1887 $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
1889 endef
1891 endif # SYSTEM_EPUBGEN
1893 ifneq ($(SYSTEM_REVENGE),)
1895 define gb_LinkTarget__use_revenge
1896 $(call gb_LinkTarget_set_include,$(1),\
1897 $$(INCLUDE) \
1898 $(REVENGE_CFLAGS) \
1900 $(call gb_LinkTarget_add_libs,$(1),$(REVENGE_LIBS))
1902 endef
1904 gb_ExternalProject__use_revenge :=
1906 else # !SYSTEM_REVENGE
1908 ifeq ($(COM),MSC)
1910 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
1911 revenge \
1914 define gb_LinkTarget__use_revenge
1915 $(call gb_LinkTarget_set_include,$(1),\
1916 $(REVENGE_CFLAGS) \
1917 $$(INCLUDE) \
1919 $(call gb_LinkTarget_use_libraries,$(1),\
1920 revenge \
1923 endef
1925 define gb_ExternalProject__use_revenge
1926 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,revenge)
1928 endef
1930 else # !MSC
1932 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
1933 librevenge \
1936 define gb_LinkTarget__use_revenge
1937 $(call gb_LinkTarget_use_package,$(1),librevenge)
1939 $(call gb_LinkTarget_set_include,$(1),\
1940 $(REVENGE_CFLAGS) \
1941 -DLIBREVENGE_VISIBILITY \
1942 $$(INCLUDE) \
1944 $(call gb_LinkTarget_add_libs,$(1),\
1945 $(REVENGE_LIBS) \
1947 endef
1949 define gb_ExternalProject__use_revenge
1950 $(call gb_ExternalProject_use_package,$(1),librevenge)
1952 endef
1954 endif # MSC
1956 endif # SYSTEM_REVENGE
1959 ifneq ($(SYSTEM_ABW),)
1961 define gb_LinkTarget__use_abw
1962 $(call gb_LinkTarget_set_include,$(1),\
1963 $$(INCLUDE) \
1964 $(ABW_CFLAGS) \
1966 $(call gb_LinkTarget_add_libs,$(1),$(ABW_LIBS))
1968 endef
1969 gb_ExternalProject__use_abw :=
1971 else # !SYSTEM_ABW
1973 define gb_LinkTarget__use_abw
1974 $(call gb_LinkTarget_set_include,$(1),\
1975 -I$(call gb_UnpackedTarball_get_dir,libabw)/inc \
1976 $$(INCLUDE) \
1978 $(call gb_LinkTarget_add_libs,$(1),\
1979 $(call gb_UnpackedTarball_get_dir,libabw)/src/lib/.libs/libabw-0.1$(gb_StaticLibrary_PLAINEXT) \
1981 $(call gb_LinkTarget_use_external_project,$(1),libabw)
1983 endef
1984 define gb_ExternalProject__use_abw
1985 $(call gb_ExternalProject_use_external_project,$(1),libabw)
1987 endef
1989 endif # SYSTEM_ABW
1992 ifneq ($(SYSTEM_MSPUB),)
1994 define gb_LinkTarget__use_mspub
1995 $(call gb_LinkTarget_set_include,$(1),\
1996 $$(INCLUDE) \
1997 $(MSPUB_CFLAGS) \
1999 $(call gb_LinkTarget_add_libs,$(1),$(MSPUB_LIBS))
2001 endef
2003 else # !SYSTEM_MSPUB
2005 define gb_LinkTarget__use_mspub
2006 $(call gb_LinkTarget_set_include,$(1),\
2007 -I$(call gb_UnpackedTarball_get_dir,libmspub)/inc \
2008 $$(INCLUDE) \
2010 $(call gb_LinkTarget_add_libs,$(1),\
2011 $(call gb_UnpackedTarball_get_dir,libmspub)/src/lib/.libs/libmspub-0.1$(gb_StaticLibrary_PLAINEXT) \
2013 $(call gb_LinkTarget_use_external_project,$(1),libmspub)
2015 endef
2017 endif # SYSTEM_MSPUB
2020 ifneq ($(SYSTEM_PAGEMAKER),)
2022 define gb_LinkTarget__use_pagemaker
2023 $(call gb_LinkTarget_set_include,$(1),\
2024 $$(INCLUDE) \
2025 $(PAGEMAKER_CFLAGS) \
2027 $(call gb_LinkTarget_add_libs,$(1),$(PAGEMAKER_LIBS))
2029 endef
2030 gb_ExternalProject__use_pagemaker :=
2032 else # !SYSTEM_PAGEMAKER
2034 define gb_LinkTarget__use_pagemaker
2035 $(call gb_LinkTarget_set_include,$(1),\
2036 -I$(call gb_UnpackedTarball_get_dir,libpagemaker)/inc \
2037 $$(INCLUDE) \
2039 $(call gb_LinkTarget_add_libs,$(1),\
2040 $(call gb_UnpackedTarball_get_dir,libpagemaker)/src/lib/.libs/libpagemaker-0.0$(gb_StaticLibrary_PLAINEXT) \
2042 $(call gb_LinkTarget_use_external_project,$(1),libpagemaker)
2044 endef
2045 define gb_ExternalProject__use_pagemaker
2046 $(call gb_ExternalProject_use_external_project,$(1),libpagemaker)
2048 endef
2050 endif # SYSTEM_PAGEMAKER
2053 ifneq ($(SYSTEM_QXP),)
2055 define gb_LinkTarget__use_qxp
2056 $(call gb_LinkTarget_set_include,$(1),\
2057 $$(INCLUDE) \
2058 $(QXP_CFLAGS) \
2060 $(call gb_LinkTarget_add_libs,$(1),$(QXP_LIBS))
2062 endef
2063 gb_ExternalProject__use_qxp :=
2065 else # !SYSTEM_QXP
2067 define gb_LinkTarget__use_qxp
2068 $(call gb_LinkTarget_set_include,$(1),\
2069 -I$(call gb_UnpackedTarball_get_dir,libqxp)/inc \
2070 $$(INCLUDE) \
2072 $(call gb_LinkTarget_add_libs,$(1),\
2073 $(call gb_UnpackedTarball_get_dir,libqxp)/src/lib/.libs/libqxp-0.0$(gb_StaticLibrary_PLAINEXT) \
2075 $(call gb_LinkTarget_use_external_project,$(1),libqxp)
2077 endef
2078 define gb_ExternalProject__use_qxp
2079 $(call gb_ExternalProject_use_external_project,$(1),libqxp)
2081 endef
2083 endif # SYSTEM_QXP
2086 ifneq ($(SYSTEM_ZMF),)
2088 define gb_LinkTarget__use_zmf
2089 $(call gb_LinkTarget_set_include,$(1),\
2090 $$(INCLUDE) \
2091 $(ZMF_CFLAGS) \
2093 $(call gb_LinkTarget_add_libs,$(1),$(ZMF_LIBS))
2095 endef
2096 gb_ExternalProject__use_zmf :=
2098 else # !SYSTEM_ZMF
2100 define gb_LinkTarget__use_zmf
2101 $(call gb_LinkTarget_set_include,$(1),\
2102 -I$(call gb_UnpackedTarball_get_dir,libzmf)/inc \
2103 $$(INCLUDE) \
2105 $(call gb_LinkTarget_add_libs,$(1),\
2106 $(call gb_UnpackedTarball_get_dir,libzmf)/src/lib/.libs/libzmf-0.0$(gb_StaticLibrary_PLAINEXT) \
2108 $(call gb_LinkTarget_use_external_project,$(1),libzmf)
2110 endef
2111 define gb_ExternalProject__use_zmf
2112 $(call gb_ExternalProject_use_external_project,$(1),libzmf)
2114 endef
2116 endif # SYSTEM_ZMF
2119 ifneq ($(SYSTEM_VISIO),)
2121 define gb_LinkTarget__use_visio
2122 $(call gb_LinkTarget_set_include,$(1),\
2123 $$(INCLUDE) \
2124 $(VISIO_CFLAGS) \
2126 $(call gb_LinkTarget_add_libs,$(1),$(VISIO_LIBS))
2128 endef
2130 else # !SYSTEM_VISIO
2132 define gb_LinkTarget__use_visio
2133 $(call gb_LinkTarget_set_include,$(1),\
2134 -I$(call gb_UnpackedTarball_get_dir,libvisio)/inc \
2135 $$(INCLUDE) \
2137 $(call gb_LinkTarget_add_libs,$(1),\
2138 $(call gb_UnpackedTarball_get_dir,libvisio)/src/lib/.libs/libvisio-0.1$(gb_StaticLibrary_PLAINEXT) \
2140 $(call gb_LinkTarget_use_external_project,$(1),libvisio)
2142 endef
2144 endif # SYSTEM_VISIO
2147 ifneq ($(SYSTEM_WPD),)
2149 define gb_LinkTarget__use_wpd
2150 $(call gb_LinkTarget_set_include,$(1),\
2151 $$(INCLUDE) \
2152 $(WPD_CFLAGS) \
2154 $(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
2156 endef
2157 gb_ExternalProject__use_wpd :=
2159 else # !SYSTEM_WPD
2161 ifeq ($(COM),MSC)
2163 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2164 wpd \
2167 define gb_LinkTarget__use_wpd
2168 $(call gb_LinkTarget_set_include,$(1),\
2169 $(WPD_CFLAGS) \
2170 $$(INCLUDE) \
2172 $(call gb_LinkTarget_use_libraries,$(1),\
2173 wpd \
2176 endef
2178 define gb_ExternalProject__use_wpd
2179 $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Library_get_target,wpd)
2181 endef
2183 else # !MSC
2185 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2186 libwpd \
2189 define gb_LinkTarget__use_wpd
2190 $(call gb_LinkTarget_use_package,$(1),libwpd)
2192 $(call gb_LinkTarget_set_include,$(1),\
2193 $(WPD_CFLAGS) \
2194 $$(INCLUDE) \
2196 $(call gb_LinkTarget_add_libs,$(1),\
2197 $(WPD_LIBS) \
2200 endef
2202 define gb_ExternalProject__use_wpd
2203 $(call gb_ExternalProject_use_package,$(1),libwpd)
2205 endef
2207 endif # MSC
2209 endif # SYSTEM_WPD
2212 ifneq ($(SYSTEM_WPG),)
2214 define gb_LinkTarget__use_wpg
2215 $(call gb_LinkTarget_set_include,$(1),\
2216 $$(INCLUDE) \
2217 $(WPG_CFLAGS) \
2219 $(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
2221 endef
2222 gb_ExternalProject__use_wpg :=
2224 else # !SYSTEM_WPG
2226 ifeq ($(COM),MSC)
2228 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2229 wpg \
2232 define gb_LinkTarget__use_wpg
2233 $(call gb_LinkTarget_set_include,$(1),\
2234 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2235 $$(INCLUDE) \
2237 $(call gb_LinkTarget_use_libraries,$(1),\
2238 wpg \
2241 endef
2243 else # !MSC
2245 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2246 libwpg \
2249 define gb_LinkTarget__use_wpg
2250 $(call gb_LinkTarget_use_package,$(1),libwpg)
2252 $(call gb_LinkTarget_set_include,$(1),\
2253 -I$(call gb_UnpackedTarball_get_dir,libwpg)/inc \
2254 $$(INCLUDE) \
2256 $(call gb_LinkTarget_add_libs,$(1),\
2257 -L$(call gb_UnpackedTarball_get_dir,libwpg)/src/lib/.libs -lwpg-0.3 \
2260 endef
2262 endif # MSC
2264 endif # SYSTEM_WPG
2267 ifneq ($(SYSTEM_WPS),)
2269 define gb_LinkTarget__use_wps
2270 $(call gb_LinkTarget_set_include,$(1),\
2271 $$(INCLUDE) \
2272 $(WPS_CFLAGS) \
2274 $(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
2276 endef
2277 gb_ExternalProject__use_wps :=
2279 else # !SYSTEM_WPS
2281 ifeq ($(COM),MSC)
2283 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2284 wps \
2287 define gb_LinkTarget__use_wps
2288 $(call gb_LinkTarget_set_include,$(1),\
2289 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2290 $$(INCLUDE) \
2293 $(call gb_LinkTarget_use_libraries,$(1),\
2294 wps \
2297 endef
2299 else # !MSC
2301 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
2302 libwps \
2305 define gb_LinkTarget__use_wps
2306 $(call gb_LinkTarget_use_package,$(1),libwps)
2308 $(call gb_LinkTarget_set_include,$(1),\
2309 -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \
2310 $$(INCLUDE) \
2312 $(call gb_LinkTarget_add_libs,$(1),\
2313 -L$(call gb_UnpackedTarball_get_dir,libwps)/src/lib/.libs -lwps-0.4 \
2316 endef
2318 endif # MSC
2320 endif # SYSTEM_WPS
2323 ifneq ($(SYSTEM_MWAW),)
2325 define gb_LinkTarget__use_mwaw
2326 $(call gb_LinkTarget_set_include,$(1),\
2327 $$(INCLUDE) \
2328 $(MWAW_CFLAGS) \
2330 $(call gb_LinkTarget_add_libs,$(1),$(MWAW_LIBS))
2332 endef
2334 else # !SYSTEM_MWAW
2336 ifeq ($(COM),MSC)
2338 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2339 mwaw \
2342 define gb_LinkTarget__use_mwaw
2343 $(call gb_LinkTarget_set_include,$(1),\
2344 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2345 $$(INCLUDE) \
2348 $(call gb_LinkTarget_use_libraries,$(1),\
2349 mwaw \
2352 endef
2354 else # !MSC
2356 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2357 libmwaw \
2360 define gb_LinkTarget__use_mwaw
2361 $(call gb_LinkTarget_use_package,$(1),libmwaw)
2363 $(call gb_LinkTarget_set_include,$(1),\
2364 -I$(call gb_UnpackedTarball_get_dir,libmwaw)/inc \
2365 $$(INCLUDE) \
2367 $(call gb_LinkTarget_add_libs,$(1),\
2368 -L$(call gb_UnpackedTarball_get_dir,libmwaw)/src/lib/.libs -lmwaw-0.3 \
2371 endef
2373 endif # MSC
2375 endif # SYSTEM_MWAW
2377 ifneq ($(SYSTEM_STAROFFICE),)
2379 define gb_LinkTarget__use_staroffice
2380 $(call gb_LinkTarget_set_include,$(1),\
2381 $$(INCLUDE) \
2382 $(STAROFFICE_CFLAGS) \
2384 $(call gb_LinkTarget_add_libs,$(1),$(STAROFFICE_LIBS))
2386 endef
2388 else # !SYSTEM_STAROFFICE
2390 ifeq ($(COM),MSC)
2392 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2393 staroffice \
2396 define gb_LinkTarget__use_staroffice
2397 $(call gb_LinkTarget_set_include,$(1),\
2398 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2399 $$(INCLUDE) \
2402 $(call gb_LinkTarget_use_libraries,$(1),\
2403 staroffice \
2406 endef
2408 else # !MSC
2410 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2411 libstaroffice \
2414 define gb_LinkTarget__use_staroffice
2415 $(call gb_LinkTarget_use_package,$(1),libstaroffice)
2417 $(call gb_LinkTarget_set_include,$(1),\
2418 -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
2419 $$(INCLUDE) \
2421 $(call gb_LinkTarget_add_libs,$(1),\
2422 -L$(call gb_UnpackedTarball_get_dir,libstaroffice)/src/lib/.libs -lstaroffice-0.0 \
2425 endef
2427 endif # MSC
2429 endif # SYSTEM_STAROFFICE
2432 ifneq ($(SYSTEM_LCMS2),)
2434 define gb_LinkTarget__use_lcms2
2435 $(call gb_LinkTarget_set_include,$(1),\
2436 $$(INCLUDE) \
2437 $(LCMS2_CFLAGS) \
2439 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2441 endef
2443 gb_ExternalProject__use_lcms2 :=
2445 else # !SYSTEM_LCMS2
2447 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2448 lcms2 \
2451 define gb_ExternalProject__use_lcms2
2452 $(call gb_ExternalProject_use_package,$(1),lcms2)
2454 endef
2456 ifeq ($(OS),ANDROID)
2458 define gb_LinkTarget__use_lcms2
2459 $(call gb_LinkTarget_use_package,$(1),lcms2)
2460 $(call gb_LinkTarget_set_include,$(1),\
2461 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2462 $$(INCLUDE) \
2465 endef
2467 else
2469 define gb_LinkTarget__use_lcms2
2470 $(call gb_LinkTarget_use_package,$(1),lcms2)
2471 $(call gb_LinkTarget_set_include,$(1),\
2472 -I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
2473 $$(INCLUDE) \
2475 $(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
2477 endef
2479 endif # ANDROID
2480 endif # SYSTEM_LCMS2
2482 ifneq ($(ENABLE_LPSOLVE),)
2484 ifneq ($(SYSTEM_LPSOLVE),)
2486 define gb_LinkTarget__use_lpsolve
2487 $(call gb_LinkTarget_add_libs,$(1),-llpsolve55)
2488 $(call gb_LinkTarget_add_defs,$(1),\
2489 -DSYSTEM_LPSOLVE \
2492 endef
2494 else # !SYSTEM_LPSOLVE
2496 define gb_LinkTarget__use_lpsolve
2497 $(call gb_LinkTarget_use_external_project,$(1),lpsolve)
2498 ifeq ($(COM),MSC)
2499 $(call gb_LinkTarget_add_libs,$(1),\
2500 $(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55/lpsolve55.lib \
2502 else
2503 $(call gb_LinkTarget_add_libs,$(1),\
2504 -L$(call gb_UnpackedTarball_get_dir,lpsolve)/lpsolve55 -llpsolve55 \
2506 endif
2507 $(call gb_LinkTarget_set_include,$(1),\
2508 -I$(call gb_UnpackedTarball_get_dir,lpsolve) \
2509 $$(INCLUDE) \
2512 endef
2514 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2515 lpsolve \
2518 endif # SYSTEM_LPSOLVE
2520 else
2522 gb_LinkTarget__use_lpsolve :=
2524 endif # ENABLE_LPSOLVE
2526 ifneq ($(ENABLE_COINMP),)
2528 ifneq ($(SYSTEM_COINMP),TRUE)
2530 define gb_LinkTarget__use_coinmp
2531 $(call gb_LinkTarget_use_package,$(1),coinmp)
2532 ifeq ($(COM),MSC)
2533 $(call gb_LinkTarget_add_libs,$(1),\
2534 $(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/MSVisualStudio/v9/$(wnt_arch_subdir_optional)$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/CoinMP.lib \
2536 else
2537 $(call gb_LinkTarget_add_libs,$(1),\
2538 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cbc/src/.libs -lCbc -lCbcSolver \
2539 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Cgl/src/.libs -lCgl \
2540 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/.libs -lClp \
2541 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Clp/src/OsiClp/.libs -lOsiClp \
2542 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src/.libs -lCoinMP \
2543 -L$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src/.libs -lCoinUtils \
2544 -L$(call gb_UnpackedTarball_get_dir,coinmp)/Osi/src/Osi/.libs -lOsi \
2546 endif
2547 $(call gb_LinkTarget_set_include,$(1),\
2548 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinMP/src \
2549 -I$(call gb_UnpackedTarball_get_dir,coinmp)/CoinUtils/src \
2550 $$(INCLUDE) \
2553 endef
2555 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2556 coinmp \
2559 else # SYSTEM_COINMP
2561 define gb_LinkTarget__use_coinmp
2562 $(call gb_LinkTarget_set_include,$(1),\
2563 $$(INCLUDE) \
2564 $(COINMP_CFLAGS) \
2566 $(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
2568 endef
2570 endif
2572 else
2574 gb_LinkTarget__use_coinmp :=
2576 endif # ENABLE_COINMP
2578 ifneq (,$(filter MDNSRESPONDER,$(BUILD_TYPE)))
2580 define gb_LinkTarget__use_mDNSResponder
2581 $(call gb_LinkTarget_set_include,$(1),\
2582 -I$(call gb_UnpackedTarball_get_dir,mDNSResponder)/mDNSShared \
2583 $$(INCLUDE) \
2585 $(call gb_LinkTarget_use_static_libraries,$(1),mDNSResponder)
2586 endef
2588 endif # MDNSRESPONDER
2590 ifeq ($(ENABLE_GIO),TRUE)
2592 define gb_LinkTarget__use_gio
2593 $(call gb_LinkTarget_set_include,$(1),\
2594 $$(INCLUDE) \
2595 $(GIO_CFLAGS) \
2598 $(call gb_LinkTarget_add_libs,$(1),$(GIO_LIBS))
2600 endef
2602 else # ENABLE_GIO
2604 define gb_LinkTarget__use_gio
2606 endef
2608 endif # ENABLE_GIO
2610 ifeq ($(ENABLE_AVAHI),TRUE)
2612 define gb_LinkTarget__use_avahi
2613 $(call gb_LinkTarget_set_include,$(1),\
2614 $$(INCLUDE) \
2615 $(AVAHI_CFLAGS) \
2618 $(call gb_LinkTarget_add_defs,$(1),\
2619 -DENABLE_AVAHI \
2622 $(call gb_LinkTarget_add_libs,$(1),$(AVAHI_LIBS))
2624 endef
2626 else # ENABLE_AVAHI
2628 gb_LinkTarget__use_avahi :=
2630 endif # ENABLE_AVAHI
2633 define gb_LinkTarget__use_gtk
2634 $(call gb_LinkTarget_set_include,$(1),\
2635 $$(INCLUDE) \
2636 $(GTK_CFLAGS) \
2639 $(call gb_LinkTarget_add_libs,$(1),$(GTK_LIBS))
2641 ifeq ($(ENABLE_GTK_PRINT),TRUE)
2643 $(call gb_LinkTarget_add_defs,$(1),-DENABLE_GTK_PRINT)
2645 $(call gb_LinkTarget_set_include,$(1),\
2646 $$(INCLUDE) \
2647 $(GTK_PRINT_CFLAGS) \
2650 $(call gb_LinkTarget_add_libs,$(1),$(GTK_PRINT_LIBS))
2652 endif
2654 endef
2656 define gb_LinkTarget__use_gthread
2657 $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
2658 endef
2660 ifeq ($(ENABLE_CUPS),TRUE)
2662 define gb_LinkTarget__use_cups
2663 $(call gb_LinkTarget_add_defs,$(1),\
2664 -DENABLE_CUPS \
2667 $(call gb_LinkTarget_add_libs,$(1),\
2668 -lcups \
2671 endef
2673 else # ENABLE_CUPS
2675 define gb_LinkTarget__use_cups
2677 endef
2679 endif # ENABLE_DBUS
2681 ifeq ($(ENABLE_DBUS),TRUE)
2683 define gb_LinkTarget__use_dbus
2684 $(call gb_LinkTarget_set_include,$(1),\
2685 $$(INCLUDE) \
2686 $(DBUS_CFLAGS) \
2689 $(call gb_LinkTarget_add_libs,$(1),\
2690 $(DBUS_LIBS) \
2693 endef
2695 else # ENABLE_DBUS
2697 define gb_LinkTarget__use_dbus
2699 endef
2701 endif # ENABLE_DBUS
2704 ifneq ($(SYSTEM_LIBPNG),)
2706 define gb_LinkTarget__use_libpng
2707 $(call gb_LinkTarget_set_include,$(1),\
2708 $$(INCLUDE) \
2709 $(LIBPNG_CFLAGS) \
2712 $(call gb_LinkTarget_add_libs,$(1),\
2713 $(LIBPNG_LIBS) \
2716 endef
2718 gb_ExternalProject__use_libpng :=
2720 else # !SYSTEM_LIBPNG
2722 define gb_LinkTarget__use_libpng
2723 $(call gb_LinkTarget_set_include,$(1),\
2724 $(LIBPNG_CFLAGS) \
2725 $$(INCLUDE) \
2727 $(call gb_LinkTarget_use_static_libraries,$(1),\
2728 libpng \
2730 $(call gb_LinkTarget__use_zlib,$(1))
2732 endef
2734 define gb_ExternalProject__use_libpng
2735 $(call gb_ExternalProject_use_static_libraries,$(1),\
2736 libpng \
2739 endef
2741 endif # !SYSTEM_LIBPNG
2744 ifneq ($(SYSTEM_CURL),)
2746 define gb_LinkTarget__use_curl
2747 $(call gb_LinkTarget_add_defs,$(1),\
2748 -DSYSTEM_CURL \
2750 $(call gb_LinkTarget_set_include,$(1),\
2751 $$(INCLUDE) \
2752 $(CURL_CFLAGS) \
2754 $(call gb_LinkTarget_add_libs,$(1),$(CURL_LIBS))
2756 endef
2758 else # !SYSTEM_CURL
2760 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
2761 curl \
2764 define gb_LinkTarget__use_curl
2765 $(call gb_LinkTarget_use_package,$(1),curl)
2766 $(call gb_LinkTarget_set_include,$(1),\
2767 -I$(call gb_UnpackedTarball_get_dir,curl/include) \
2768 $$(INCLUDE) \
2771 ifeq ($(COM),MSC)
2772 $(call gb_LinkTarget_add_libs,$(1),\
2773 $(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 \
2775 else
2776 $(call gb_LinkTarget_add_libs,$(1),\
2777 -L$(call gb_UnpackedTarball_get_dir,curl)/lib/.libs -lcurl \
2779 endif
2781 endef
2783 endif # SYSTEM_CURL
2785 ifeq ($(ENABLE_VALGRIND),TRUE)
2787 define gb_LinkTarget__use_valgrind
2788 $(call gb_LinkTarget_add_defs,$(1),\
2789 -DHAVE_VALGRIND_HEADERS \
2792 $(call gb_LinkTarget_set_include,$(1),\
2793 $$(INCLUDE) \
2794 $(VALGRIND_CFLAGS) \
2797 endef
2799 else # !ENABLE_VALGRIND
2801 define gb_LinkTarget__use_valgrind
2803 endef
2805 endif # ENABLE_VALGRIND
2807 ifneq ($(SYSTEM_POPPLER),)
2809 define gb_LinkTarget__use_poppler
2810 $(call gb_LinkTarget_set_include,$(1),\
2811 $(POPPLER_CFLAGS) \
2812 $$(INCLUDE) \
2815 $(call gb_LinkTarget_add_libs,$(1),\
2816 $(POPPLER_LIBS) \
2819 endef
2821 else # !SYSTEM_POPPLER
2823 define gb_LinkTarget__use_poppler
2824 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
2826 $(call gb_LinkTarget_set_include,$(1),\
2827 -I$(call gb_UnpackedTarball_get_dir,poppler) \
2828 -I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
2829 -I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
2830 $$(INCLUDE) \
2833 $(call gb_LinkTarget_add_libs,$(1),\
2834 $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
2835 $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
2836 $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
2839 $(call gb_LinkTarget_use_external,$(1),libjpeg)
2841 ifeq ($(OS),MACOSX)
2842 $(call gb_LinkTarget_add_libs,$(1),\
2843 -lobjc \
2845 else ifeq ($(OS),LINUX)
2846 $(call gb_LinkTarget_add_libs,$(1),\
2847 -pthread \
2849 else ifeq ($(OS),WNT)
2850 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
2851 advapi32 \
2852 gdi32 \
2854 endif
2856 endef
2858 endif # SYSTEM_POPPLER
2861 ifneq ($(SYSTEM_CLUCENE),)
2863 define gb_LinkTarget__use_clucene
2864 $(call gb_LinkTarget_add_defs,$(1),\
2865 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS))) \
2868 $(call gb_LinkTarget_set_include,$(1),\
2869 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(CLUCENE_CFLAGS)))) \
2870 $$(INCLUDE) \
2873 $(call gb_LinkTarget_add_libs,$(1),\
2874 $(CLUCENE_LIBS) \
2877 endef
2879 else # !SYSTEM_CLUCENE
2881 define gb_LinkTarget__use_clucene
2882 $(call gb_LinkTarget_set_include,$(1),\
2883 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/core \
2884 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/shared \
2885 -I$(call gb_UnpackedTarball_get_dir,clucene)/src/contribs-lib \
2886 $$(INCLUDE) \
2889 $(call gb_LinkTarget_use_libraries,$(1),\
2890 clucene \
2893 endef
2895 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
2896 clucene \
2899 endif # SYSTEM_CLUCENE
2901 define gb_LinkTarget__use_gobject
2902 $(call gb_LinkTarget_add_libs,$(1),\
2903 $(GOBJECT_LIBS) \
2906 $(call gb_LinkTarget_set_include,$(1),\
2907 $$(INCLUDE) \
2908 $(GOBJECT_CFLAGS) \
2910 endef
2912 ifneq ($(SYSTEM_HSQLDB),)
2914 define gb_LinkTarget__use_hsqldb
2916 $(call gb_LinkTarget_add_defs,$(1),\
2917 -DSYSTEM_HSQLDB \
2918 -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" \
2921 endef
2923 else # !SYSTEM_HSQLDB
2925 define gb_LinkTarget__use_hsqldb
2927 endef
2929 endif # SYSTEM_HSQLDB
2932 ifneq ($(SYSTEM_OPENLDAP),)
2934 define gb_LinkTarget__use_openldap
2936 $(call gb_LinkTarget_add_libs,$(1),\
2937 -lldap \
2938 -llber \
2941 endef
2943 gb_ExternalProject__use_openldap :=
2945 else # !SYSTEM_OPENLDAP
2947 define gb_LinkTarget__use_openldap
2948 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
2949 $(call gb_LinkTarget_set_include,$(1),\
2950 -I$(call gb_UnpackedTarball_get_dir,openldap/include) \
2951 $$(INCLUDE) \
2953 $(call gb_LinkTarget_use_external_project,$(1),openldap,full)
2954 $(call gb_LinkTarget_add_libs,$(1), \
2955 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs/libldap.a \
2956 $(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs/liblber.a \
2959 endef
2961 define gb_ExternalProject__use_openldap
2962 $(call gb_ExternalProject_use_external_project,$(1),openldap)
2964 endef
2966 endif # SYSTEM_OPENLDAP
2968 ifneq ($(SYSTEM_LIBTOMMATH),)
2970 define gb_LinkTarget__use_libtommath
2971 $(call gb_LinkTarget_set_include,$(1),\
2972 $(LIBTOMMATH_CFLAGS) \
2973 $$(INCLUDE) \
2975 $(call gb_LinkTarget_add_libs,$(1),$(LIBTOMMATH_LIBS))
2977 endef
2979 else # !SYSTEM_LIBTOMMATH
2980 define gb_LinkTarget__use_libtommath
2981 $(call gb_LinkTarget_set_include,$(1),\
2982 -I${WORKDIR}/UnpackedTarball/libtommath \
2983 $$(INCLUDE) \
2985 $(call gb_LinkTarget_add_libs,$(1),\
2986 $(call gb_UnpackedTarball_get_dir,libtommath)/libtommath$(gb_StaticLibrary_PLAINEXT) \
2988 $(call gb_LinkTarget_use_external_project,$(1),libtommath)
2990 endef
2992 endif # SYSTEM_LIBTOMMATH
2994 define gb_ExternalProject__use_libtommath
2995 $(call gb_ExternalProject_use_external_project,$(1),libtommath)
2997 endef
2999 ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
3001 ifneq ($(SYSTEM_FIREBIRD),)
3003 define gb_LinkTarget__use_libfbembed
3004 $(call gb_LinkTarget_set_include,$(1),\
3005 $(FIREBIRD_CFLAGS) \
3006 $$(INCLUDE) \
3008 $(call gb_LinkTarget_add_libs,$(1),$(FIREBIRD_LIBS))
3010 endef
3012 else # !SYSTEM_FIREBIRD
3014 $(eval $(call gb_Helper_register_packages_for_install,firebirdsdbc,\
3015 firebird \
3018 #$(call gb_LinkTarget__use_libatomic_ops,$(1))
3019 #$(call gb_LinkTarget__use_libtommath,$(1))
3021 define gb_LinkTarget__use_libfbembed
3022 $(call gb_LinkTarget_use_package,$(1),firebird)
3023 $(call gb_LinkTarget_set_include,$(1),\
3024 -I$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/include \
3025 $$(INCLUDE) \
3027 ifeq ($(COM),MSC)
3028 $(call gb_LinkTarget_add_libs,$(1),\
3029 $(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.lib \
3031 else
3032 $(call gb_LinkTarget_add_libs,$(1),\
3033 -L$(call gb_UnpackedTarball_get_dir,firebird)/gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/lib -lfbclient \
3035 endif
3037 endef
3040 # endef
3042 endif # SYSTEM_FIREBIRD
3044 else # !ENABLE_FIREBIRD_SDBC
3046 gb_LinkTarget__use_firebird :=
3047 # gb_LinkTarget__use_atomic_ops :=
3048 # gb_LinkTarget__use_libtommath :=
3050 endif # ENABLE_FIREBIRD_SDBC
3053 ifneq ($(SYSTEM_POSTGRESQL),)
3055 define gb_LinkTarget__use_postgresql
3057 $(call gb_LinkTarget_set_include,$(1),\
3058 $(POSTGRESQL_INC) \
3059 $$(INCLUDE) \
3062 $(call gb_LinkTarget_add_libs,$(1),\
3063 -lpq \
3066 $(call gb_LinkTarget_add_ldflags,$(1),\
3067 $(POSTGRESQL_LIB) \
3070 endef
3072 else # !SYSTEM_POSTGRESQL
3074 define gb_LinkTarget__use_postgresql
3076 $(call gb_LinkTarget_use_external_project,$(1),postgresql)
3078 $(call gb_LinkTarget_set_include,$(1),\
3079 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
3080 -I$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq \
3081 $$(INCLUDE) \
3084 $(call gb_LinkTarget_add_libs,$(1),\
3085 $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
3088 ifeq ($(OS),WNT)
3089 $(call gb_LinkTarget_use_external,$(1),openssl)
3091 $(call gb_LinkTarget_use_system_win32_libs,$(1),\
3092 secur32 \
3093 ws2_32 \
3096 endif
3098 endef
3100 endif # SYSTEM_POSTGRESQL
3102 ifeq ($(ENABLE_KDE4),TRUE)
3104 define gb_LinkTarget__use_kde4
3105 $(call gb_LinkTarget_set_include,$(1),\
3106 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS)))) \
3107 $$(INCLUDE) \
3110 $(call gb_LinkTarget_add_defs,$(1),\
3111 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KDE4_CFLAGS))) \
3114 $(call gb_LinkTarget_add_libs,$(1),\
3115 $(KDE4_LIBS) \
3118 endef
3120 else # !ENABLE_KDE4
3122 define gb_LinkTarget__use_kde4
3124 endef
3126 endif # ENABLE_KDE4
3129 ifeq ($(ENABLE_KDE5),TRUE)
3131 define gb_LinkTarget__use_kde5
3132 $(call gb_LinkTarget_set_include,$(1),\
3133 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
3134 $$(INCLUDE) \
3137 $(call gb_LinkTarget_add_defs,$(1),\
3138 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
3141 $(call gb_LinkTarget_add_libs,$(1),\
3142 $(KF5_LIBS) \
3145 ifeq ($(COM),GCC)
3146 $(call gb_LinkTarget_add_cxxflags,$(1),\
3147 -Wno-shadow \
3149 endif
3151 endef
3153 else # !ENABLE_KDE5
3155 define gb_LinkTarget__use_kde5
3157 endef
3159 endif # ENABLE_KDE5
3163 ifeq ($(ENABLE_QT5),TRUE)
3165 define gb_LinkTarget__use_qt5
3166 $(call gb_LinkTarget_set_include,$(1),\
3167 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS)))) \
3168 $$(INCLUDE) \
3171 $(call gb_LinkTarget_add_defs,$(1),\
3172 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(QT5_CFLAGS))) \
3175 $(call gb_LinkTarget_add_libs,$(1),\
3176 $(QT5_LIBS) \
3179 ifeq ($(COM),GCC)
3180 $(call gb_LinkTarget_add_cxxflags,$(1),\
3181 -Wno-shadow \
3183 endif
3185 endef
3187 else # !ENABLE_QT5
3189 define gb_LinkTarget__use_qt5
3191 endef
3193 endif # ENABLE_QT5
3195 # PYTHON
3196 # extra python_headers external because pyuno wrapper must not link python
3197 ifneq ($(SYSTEM_PYTHON),)
3199 define gb_LinkTarget__use_python_headers
3200 $(call gb_LinkTarget_add_defs,$(1),\
3201 $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(PYHTON_CFLAGS)))) \
3204 $(call gb_LinkTarget_set_include,$(1),\
3205 $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(PYTHON_CFLAGS)))) \
3206 $$(INCLUDE) \
3209 endef
3211 define gb_LinkTarget__use_python
3212 $(call gb_LinkTarget__use_python_headers,$(1))
3214 $(call gb_LinkTarget_add_libs,$(1),\
3215 $(PYTHON_LIBS) \
3218 endef
3220 else # !SYSTEM_PYTHON
3222 $(eval $(call gb_Helper_register_packages_for_install,python,\
3223 python3 \
3226 define gb_LinkTarget__use_python_headers
3227 $(call gb_LinkTarget_use_external_project,$(1),python3,full)
3228 $(call gb_LinkTarget_set_include,$(1),\
3229 -I$(call gb_UnpackedTarball_get_dir,python3) \
3230 -I$(call gb_UnpackedTarball_get_dir,python3)/PC \
3231 -I$(call gb_UnpackedTarball_get_dir,python3)/Include \
3232 $$(INCLUDE) \
3235 endef
3237 define gb_LinkTarget__use_python
3238 $(call gb_LinkTarget__use_python_headers,$(1))
3239 ifeq ($(OS),MACOSX)
3240 $(call gb_LinkTarget_use_generated_package,$(1),python3)
3241 else
3242 $(call gb_LinkTarget_use_package,$(1),python3)
3243 endif
3245 ifeq ($(OS),WNT)
3246 $(call gb_LinkTarget_add_libs,$(1),\
3247 $(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 \
3249 else ifeq ($(OS),MACOSX)
3250 $(call gb_LinkTarget_add_libs,$(1),\
3251 -F$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@__________________________________________________OOO -framework LibreOfficePython \
3253 else
3254 $(call gb_LinkTarget_add_libs,$(1),\
3255 -L$(call gb_UnpackedTarball_get_dir,python3) \
3256 -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
3258 endif
3260 endef
3262 endif # SYSTEM_PYTHON
3264 # ORCUS
3265 ifneq ($(SYSTEM_LIBORCUS),)
3267 define gb_LinkTarget__use_orcus
3268 $(call gb_LinkTarget_set_include,$(1),\
3269 $$(INCLUDE) \
3270 $(ORCUS_CFLAGS) \
3272 $(call gb_LinkTarget_add_libs,$(1),$(ORCUS_LIBS))
3273 endef
3275 define gb_LinkTarget__use_orcus-parser
3277 endef
3279 else # !SYSTEM_LIBORCUS
3281 ifeq ($(COM),MSC)
3283 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3284 orcus \
3285 orcus-parser \
3288 define gb_LinkTarget__use_orcus
3289 $(call gb_LinkTarget_set_include,$(1),\
3290 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3291 $$(INCLUDE) \
3294 $(call gb_LinkTarget_use_libraries,$(1),\
3295 orcus \
3298 endef
3300 define gb_LinkTarget__use_orcus-parser
3301 $(call gb_LinkTarget_set_include,$(1),\
3302 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3303 $$(INCLUDE) \
3306 $(call gb_LinkTarget_use_libraries,$(1),\
3307 orcus-parser \
3310 endef
3312 else # !MSC
3314 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3315 liborcus \
3318 define gb_LinkTarget__use_orcus
3319 $(call gb_LinkTarget_use_package,$(1),liborcus)
3321 $(call gb_LinkTarget_set_include,$(1),\
3322 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3323 $$(INCLUDE) \
3326 $(call gb_LinkTarget_add_libs,$(1),\
3327 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.13 \
3330 $(if $(SYSTEM_BOOST), \
3331 $(call gb_LinkTarget_add_ldflags,$(1),$(BOOST_LDFLAGS)) \
3332 $(call gb_LinkTarget_add_libs,$(1),$(BOOST_SYSTEM_LIB)) \
3335 endef
3337 define gb_LinkTarget__use_orcus-parser
3338 $(call gb_LinkTarget_use_package,$(1),liborcus)
3340 $(call gb_LinkTarget_set_include,$(1),\
3341 -I$(call gb_UnpackedTarball_get_dir,liborcus/include) \
3342 $$(INCLUDE) \
3345 $(call gb_LinkTarget_add_libs,$(1),\
3346 -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.13 \
3349 endef
3351 endif # MSC
3353 endif # SYSTEM_LIBORCUS
3355 ifeq ($(ENABLE_EOT),TRUE)
3357 ifneq ($(SYSTEM_LIBEOT),)
3359 define gb_LinkTarget__use_libeot
3360 $(call gb_LinkTarget_set_include,$(1),\
3361 $$(INCLUDE) \
3362 $(LIBEOT_CFLAGS) \
3364 $(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
3366 endef
3368 gb_ExternalProject__use_libeot :=
3370 else # !SYSTEM_LIBEOT
3372 define gb_LinkTarget__use_libeot
3373 $(call gb_LinkTarget_set_include,$(1),\
3374 -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
3375 $$(INCLUDE) \
3377 $(call gb_LinkTarget_add_libs,$(1),\
3378 $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
3380 $(call gb_LinkTarget_use_external_project,$(1),libeot)
3382 endef
3384 define gb_ExternalProject__use_libeot
3385 $(call gb_ExternalProject_use_external_project,$(1),libeot)
3387 endef
3389 endif # SYSTEM_LIBEOT
3391 else # !ENABLE_EOT
3393 gb_LinkTarget__use_libeot :=
3394 gb_ExternalProject__use_libeot :=
3396 endif # ENABLE_EOT
3398 ### X11 stuff ###
3400 ifeq ($(USING_X11), TRUE)
3402 define gb_LinkTarget__use_Xrandr
3403 $(call gb_LinkTarget_set_include,$(1),\
3404 $$(INCLUDE) \
3405 $(XRANDR_CFLAGS) \
3408 $(call gb_LinkTarget_add_libs,$(1),\
3409 $(XRANDR_LIBS) \
3411 endef
3413 define gb_LinkTarget__use_Xrender
3414 $(call gb_LinkTarget_set_include,$(1),\
3415 $$(INCLUDE) \
3416 $(XRENDER_CFLAGS) \
3419 $(call gb_LinkTarget_add_libs,$(1),\
3420 $(XRENDER_LIBS) \
3422 endef
3424 endif # USING_X11
3427 gb_ExternalProject__use_nss3:=
3430 ifneq ($(SYSTEM_NSS),)
3432 define gb_LinkTarget__use_nss3
3433 $(call gb_LinkTarget_add_defs,$(1),\
3434 -DSYSTEM_NSS \
3437 $(call gb_LinkTarget_set_include,$(1),\
3438 $$(INCLUDE) \
3439 $(NSS_CFLAGS) \
3442 $(call gb_LinkTarget_add_libs,$(1),\
3443 $(NSS_LIBS) \
3446 endef
3448 define gb_LinkTarget__use_plc4
3449 $(call gb_LinkTarget__use_nss3,$(1))
3451 endef
3453 define gb_LinkTarget__use_ssl3
3454 $(call gb_LinkTarget__use_nss3,$(1))
3456 endef
3458 else # !SYSTEM_NSS
3460 $(eval $(call gb_Helper_register_packages_for_install,ooo, \
3461 nss \
3464 define gb_LinkTarget__use_nss3
3465 $(call gb_LinkTarget_use_package,$(1),nss)
3466 $(call gb_LinkTarget_set_include,$(1),\
3467 $$(INCLUDE) \
3468 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
3469 -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
3472 ifeq ($(COM),MSC)
3473 $(call gb_LinkTarget_add_libs,$(1),\
3474 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nspr4.lib \
3475 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nss3.lib \
3476 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/smime3.lib \
3478 else
3479 $(call gb_LinkTarget_add_libs,$(1),\
3480 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
3481 -lnspr4 \
3482 -lnss3 \
3483 -lsmime3 \
3485 endif
3487 endef
3489 define gb_LinkTarget__use_plc4
3490 $(call gb_LinkTarget_use_package,$(1),nss)
3491 ifeq ($(COM),MSC)
3492 $(call gb_LinkTarget_add_libs,$(1),\
3493 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/plc4.lib \
3495 else
3496 $(call gb_LinkTarget_add_libs,$(1),\
3497 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lplc4 \
3499 endif
3501 endef
3503 define gb_LinkTarget__use_ssl3
3504 $(call gb_LinkTarget_use_package,$(1),nss)
3505 ifeq ($(COM),MSC)
3506 $(call gb_LinkTarget_add_libs,$(1),\
3507 $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/ssl3.lib \
3509 else
3510 $(call gb_LinkTarget_add_libs,$(1),\
3511 -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lssl3 \
3513 endif
3515 endef
3517 define gb_ExternalProject__use_nss3
3518 $(call gb_ExternalProject_use_package,$(1),nss)
3520 endef
3522 endif # SYSTEM_NSS
3524 ifeq ($(ENABLE_BREAKPAD),TRUE)
3526 define gb_LinkTarget__use_breakpad
3527 $(call gb_LinkTarget_set_include,$(1),\
3528 -I$(call gb_UnpackedTarball_get_dir,breakpad)/src \
3529 $$(INCLUDE) \
3532 ifeq ($(COM),MSC)
3533 $(call gb_LinkTarget_use_static_libraries,$(1),\
3534 breakpad \
3536 else
3537 $(call gb_LinkTarget_add_libs,$(1),\
3538 $(call gb_UnpackedTarball_get_dir,breakpad)/src/client/linux/libbreakpad_client.a \
3540 endif
3542 $(call gb_LinkTarget_use_external_project,$(1),breakpad)
3544 endef
3546 endif # ENABLE_BREAKPAD
3548 ifeq ($(ENABLE_GPGMEPP),TRUE)
3550 ifneq ($(SYSTEM_GPGMEPP),)
3552 gb_ExternalProject__use_gpgmepp:=
3553 gb_ExternalProject__use_libassuan:=
3554 gb_ExternalProject__use_libgpg-error:=
3556 define gb_LinkTarget__use_gpgmepp
3557 $(call gb_LinkTarget_set_include,$(1),\
3558 $$(INCLUDE) \
3559 $$(GPGMEPP_CFLAGS) \
3562 $(call gb_LinkTarget_add_libs,$(1),\
3563 $(GPGMEPP_LIBS) \
3566 endef
3568 else ifneq ($(filter GPGMEPP,$(BUILD_TYPE)),) # NON-SYSTEM_GPGME
3570 define gb_ExternalProject__use_gpgmepp
3571 $(call gb_ExternalProject_use_external_project,$(1),gpgmepp)
3573 endef
3574 define gb_ExternalProject__use_libassuan
3575 $(call gb_ExternalProject_use_external_project,$(1),libassuan)
3577 endef
3578 define gb_ExternalProject__use_libgpg-error
3579 $(call gb_ExternalProject_use_external_project,$(1),libgpg-error)
3581 endef
3583 ifneq ($(filter WNT,$(OS)),)
3585 define gb_LinkTarget__use_libgpg-error
3586 $(call gb_LinkTarget_use_package,$(1),libgpg-error)
3588 $(call gb_LinkTarget_set_include,$(1),\
3589 $(GPG_ERROR_CFLAGS) \
3590 $$(INCLUDE) \
3592 $(call gb_LinkTarget_add_libs,$(1),\
3593 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libgpg-error)/src/.libs libgpg-error.lib \
3596 endef
3598 define gb_LinkTarget__use_libassuan
3599 $(call gb_LinkTarget_use_package,$(1),libassuan)
3601 $(call gb_LinkTarget_set_include,$(1),\
3602 $(LIBASSUAN_CFLAGS) \
3603 $$(INCLUDE) \
3605 $(call gb_LinkTarget_add_libs,$(1),\
3606 -LIBPATH:$(call gb_UnpackedTarball_get_dir,libassuan)/src/.libs libassuan.lib \
3609 endef
3611 define gb_LinkTarget__use_gpgmepp
3612 $(call gb_LinkTarget_set_include,$(1),\
3613 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3614 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3615 $$(GPG_ERROR_CFLAGS) \
3616 $$(INCLUDE) \
3618 $(call gb_LinkTarget_use_libraries,$(1),\
3619 gpgmepp \
3622 endef
3624 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3625 libassuan \
3626 libgpg-error \
3629 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo,\
3630 gpgmepp \
3633 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
3634 gpgme-w32spawn \
3637 endif
3639 ifneq ($(filter MACOSX LINUX,$(OS)),)
3641 define gb_LinkTarget__use_gpgmepp
3642 $(call gb_LinkTarget_use_package,$(1),gpgmepp)
3644 $(call gb_LinkTarget_set_include,$(1),\
3645 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src \
3646 -I$(call gb_UnpackedTarball_get_dir,gpgmepp)/src \
3647 $$(GPG_ERROR_CFLAGS) \
3648 $$(INCLUDE) \
3650 $(call gb_LinkTarget_add_libs,$(1),\
3651 -L$(call gb_UnpackedTarball_get_dir,gpgmepp)/lang/cpp/src/.libs/ -lgpgmepp \
3652 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-L$(call gb_UnpackedTarball_get_dir,gpgmepp)/src/.libs/ -lgpgme) \
3653 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(GPG_ERROR_LIBS)) \
3654 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),$$(LIBASSUAN_LIBS)) \
3657 endef
3659 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
3660 gpgmepp \
3661 libassuan \
3662 libgpg-error \
3665 endif
3667 endif
3669 else # !ENABLE_GPGMEPP
3671 gb_ExternalProject__use_gpgmepp :=
3672 gb_ExternalProject__use_libassuan :=
3673 gb_ExternalProject__use_libgpg-error :=
3675 gb_LinkTarget__use_gpgmepp :=
3676 gb_LinkTarget__use_libassuan :=
3677 gb_LinkTarget__use_libgpg-error :=
3679 endif # ENABLE_GPGMEPP
3681 define gb_LinkTarget__use_dconf
3682 $(call gb_LinkTarget_add_defs,$(1),$(DCONF_CFLAGS))
3683 $(call gb_LinkTarget_add_libs,$(1),$(DCONF_LIBS))
3684 endef
3686 ### Jars ############################################################
3688 ifneq ($(SYSTEM_HSQLDB),)
3690 define gb_Jar__use_hsqldb
3691 $(call gb_Jar_use_system_jar,$(1),$(HSQLDB_JAR))
3692 endef
3693 define gb_JunitTest__use_hsqldb
3694 $(call gb_JunitTest_use_system_jar,$(1),$(HSQLDB_JAR))
3695 endef
3697 else # !SYSTEM_HSQLDB
3699 ifeq ($(ENABLE_JAVA),TRUE)
3700 $(eval $(call gb_Helper_register_jars_for_install,OOO,ooo, \
3701 hsqldb \
3703 endif
3705 define gb_Jar__use_hsqldb
3706 $(call gb_Jar_use_jar,$(1),hsqldb)
3707 endef
3708 define gb_JunitTest__use_hsqldb
3709 $(call gb_JunitTest_use_jar,$(1),hsqldb)
3710 endef
3712 endif # SYSTEM_HSQLDB
3715 ifeq ($(ENABLE_SCRIPTING_BEANSHELL),TRUE)
3717 ifneq ($(SYSTEM_BSH),)
3719 define gb_Jar__use_bsh
3720 $(call gb_Jar_use_system_jar,$(1),$(BSH_JAR))
3721 endef
3723 else # !SYSTEM_BSH
3725 ifeq ($(ENABLE_JAVA),TRUE)
3726 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_bsh, \
3727 bsh \
3729 endif
3731 define gb_Jar__use_bsh
3732 $(call gb_Jar_use_jar,$(1),bsh)
3733 endef
3735 endif # SYSTEM_BSH
3737 endif
3739 ifeq ($(ENABLE_SCRIPTING_JAVASCRIPT),TRUE)
3741 ifneq ($(SYSTEM_RHINO),)
3743 define gb_Jar__use_rhino
3744 $(call gb_Jar_use_system_jar,$(1),$(RHINO_JAR))
3745 endef
3747 else # !SYSTEM_RHINO
3749 ifeq ($(ENABLE_JAVA),TRUE)
3750 $(eval $(call gb_Helper_register_jars_for_install,OOO,extensions_rhino, \
3751 js \
3753 endif
3755 define gb_Jar__use_rhino
3756 $(call gb_Jar_use_jar,$(1),js)
3757 endef
3759 endif # SYSTEM_RHINO
3761 endif
3763 ifneq ($(SYSTEM_APACHE_COMMONS),)
3765 define gb_Jar__use_commons-logging
3766 $(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
3767 endef
3768 gb_ExternalProject__use_commons-logging :=
3770 else # !SYSTEM_APACHE_COMMONS
3772 ifeq ($(ENABLE_JAVA),TRUE)
3773 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3774 commons-logging-$(COMMONS_LOGGING_VERSION) \
3776 endif
3778 define gb_Jar__use_commons-logging
3779 $(call gb_Jar_use_external_project,$(1),apache_commons_logging)
3780 $(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
3781 endef
3782 define gb_ExternalProject__use_commons-logging
3783 $(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
3784 endef
3786 endif # SYSTEM_APACHE_COMMONS
3789 ifneq ($(SYSTEM_JFREEREPORT),)
3791 define gb_Jar__use_flow-engine
3792 $(call gb_Jar_use_system_jar,$(1),$(JFREEREPORT_JAR))
3793 endef
3795 define gb_Jar__use_flute
3796 $(call gb_Jar_use_system_jar,$(1),$(FLUTE_JAR))
3797 endef
3799 define gb_Jar__use_libbase
3800 $(call gb_Jar_use_system_jar,$(1),$(LIBBASE_JAR))
3801 endef
3803 define gb_Jar__use_libfonts
3804 $(call gb_Jar_use_system_jar,$(1),$(LIBFONTS_JAR))
3805 endef
3807 define gb_Jar__use_libformula
3808 $(call gb_Jar_use_system_jar,$(1),$(LIBFORMULA_JAR))
3809 endef
3811 define gb_Jar__use_liblayout
3812 $(call gb_Jar_use_system_jar,$(1),$(LIBLAYOUT_JAR))
3813 endef
3815 define gb_Jar__use_libloader
3816 $(call gb_Jar_use_system_jar,$(1),$(LIBLOADER_JAR))
3817 endef
3819 define gb_Jar__use_librepository
3820 $(call gb_Jar_use_system_jar,$(1),$(LIBREPOSITORY_JAR))
3821 endef
3823 define gb_Jar__use_libserializer
3824 $(call gb_Jar_use_system_jar,$(1),$(LIBSERIALIZER_JAR))
3825 endef
3827 define gb_Jar__use_libxml
3828 $(call gb_Jar_use_system_jar,$(1),$(LIBXML_JAR))
3829 endef
3831 define gb_Jar__use_sac
3832 $(call gb_Jar_use_system_jar,$(1),$(SAC_JAR))
3833 endef
3835 else # !SYSTEM_JFREEREPORT
3837 ifeq ($(ENABLE_JAVA),TRUE)
3838 $(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
3839 flow-engine \
3840 flute-1.1.6 \
3841 libbase-1.1.6 \
3842 libfonts-1.1.6 \
3843 libformula-1.1.7 \
3844 liblayout \
3845 libloader-1.1.6 \
3846 librepository-1.1.6 \
3847 libserializer-1.1.6 \
3848 libxml-1.1.7 \
3849 sac \
3851 endif
3853 define gb_Jar__use_flow-engine
3854 $(call gb_Jar_use_jar,$(1),flow-engine)
3855 endef
3857 define gb_Jar__use_flute
3858 $(call gb_Jar_use_jar,$(1),flute-1.1.6)
3859 endef
3861 define gb_Jar__use_libbase
3862 $(call gb_Jar_use_jar,$(1),libbase-1.1.6)
3863 endef
3865 define gb_Jar__use_libfonts
3866 $(call gb_Jar_use_jar,$(1),libfonts-1.1.6)
3867 endef
3869 define gb_Jar__use_libformula
3870 $(call gb_Jar_use_jar,$(1),libformula-1.1.7)
3871 endef
3873 define gb_Jar__use_liblayout
3874 $(call gb_Jar_use_jar,$(1),liblayout)
3875 endef
3877 define gb_Jar__use_libloader
3878 $(call gb_Jar_use_jar,$(1),libloader-1.1.6)
3879 endef
3881 define gb_Jar__use_librepository
3882 $(call gb_Jar_use_jar,$(1),librepository-1.1.6)
3883 endef
3885 define gb_Jar__use_libserializer
3886 $(call gb_Jar_use_jar,$(1),libserializer-1.1.6)
3887 endef
3889 define gb_Jar__use_libxml
3890 $(call gb_Jar_use_jar,$(1),libxml-1.1.7)
3891 endef
3893 define gb_Jar__use_sac
3894 $(call gb_Jar_use_jar,$(1),sac)
3895 endef
3897 endif # SYSTEM_JFREEREPORT
3900 # Executables
3902 # FIXME: the library target should be for build too
3903 define gb_Executable__register_bestreversemap
3904 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
3905 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3907 endef
3909 # TODO depending on the whole URE might be overkill, but I do not have a
3910 # Windows machine to debug it...
3911 # FIXME: the library target should be for build too
3912 define gb_Executable__register_climaker
3913 $(call gb_Executable_add_runtime_dependencies,climaker,\
3914 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3915 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3916 $(call gb_UnoApi_get_target,udkapi) \
3917 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
3919 endef
3921 define gb_Executable__register_cppumaker
3922 $(call gb_Executable_add_runtime_dependencies,cppumaker,\
3923 $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
3925 endef
3927 # This is used to determine what we need for 'build' platform.
3928 # FIXME: the library target should be for build too
3929 define gb_Executable__register_gengal
3930 $(call gb_Executable_add_runtime_dependencies,gengal,\
3931 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3932 $(call gb_Package_get_target_for_build,postprocess_images) \
3933 $(call gb_Package_get_target_for_build,postprocess_registry) \
3934 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
3935 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
3936 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
3937 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3938 $(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
3939 $(call gb_UnoApi_get_target,offapi) \
3940 $(call gb_UnoApi_get_target,udkapi) \
3942 endef
3944 ifeq ($(SYSTEM_ICU),)
3946 define gb_Executable__register_gendict
3947 $(call gb_Executable_add_runtime_dependencies,gendict,\
3948 $(call gb_Package_get_target_for_build,icu) \
3949 $(call gb_Package_get_target_for_build,icu_ure) \
3951 endef
3953 endif
3955 define gb_Executable__register_idlc
3956 $(call gb_Executable_add_runtime_dependencies,idlc,\
3957 $(call gb_ExternalExecutable_get_dependencies,ucpp) \
3959 endef
3961 define gb_Executable__register_localize
3962 $(call gb_Executable_add_runtime_dependencies,localize,\
3963 $(foreach exec,cfgex helpex propex treex ulfex xrmex,\
3964 $(call gb_Executable_get_runtime_dependencies,$(exec)) \
3967 endef
3969 # FIXME ure/services.rdb needs cleanup
3970 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
3971 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
3972 # FIXME: the library target should be for build too
3973 define gb_Executable__register_saxparser
3974 $(call gb_Executable_add_runtime_dependencies,saxparser,\
3975 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3976 $(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
3977 $(call gb_Rdb_get_target_for_build,saxparser) \
3978 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
3979 $(call gb_UnoApi_get_target,udkapi) \
3981 endef
3983 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
3984 # required due to the settings for URE_SERVICES and URE_TYPES in
3985 # cppuhelper/source/unorc
3986 # FIXME: the library target should be for build too
3987 define gb_Executable__register_uno
3988 $(call gb_Executable_add_runtime_dependencies,uno,\
3989 $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
3990 $(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
3991 $(call gb_UnoApi_get_target,udkapi) \
3993 endef
3996 # External executables
3998 ifneq ($(SYSTEM_LIBXML_FOR_BUILD),)
4000 gb_ExternalExecutable__register_xmllint :=
4002 else # ! SYSTEM_LIBXML_FOR_BUILD
4004 define gb_ExternalExecutable__register_xmllint
4005 $(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)
4006 $(call gb_ExternalExecutable_add_dependencies,xmllint,\
4007 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4008 $(call gb_Package_get_target,libxml2) \
4011 endef
4013 endif # SYSTEM_LIBXML_FOR_BUILD
4015 ifneq ($(SYSTEM_LIBXSLT_FOR_BUILD),)
4017 gb_ExternalExecutable__register_xsltproc :=
4019 else # ! SYSTEM_LIBXSLT_FOR_BUILD
4021 define gb_ExternalExecutable__register_xsltproc
4022 $(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)
4023 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
4024 $(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
4025 $(call gb_Package_get_target,libxml2) \
4026 $(call gb_Package_get_target,libxslt) \
4029 endef
4031 endif # SYSTEM_LIBXSLT_FOR_BUILD
4033 ifneq (,$(SYSTEM_UCPP))
4035 gb_ExternalExecutable__register_ucpp :=
4037 else # ! SYSTEM_UCPP
4039 define gb_ExternalExecutable__register_ucpp
4040 $(call gb_ExternalExecutable_set_internal,ucpp,$(INSTDIR_FOR_BUILD)/$(SDKDIRNAME)/bin/ucpp$(gb_Executable_EXT_for_build))
4042 endef
4044 endif # SYSTEM_UCPP
4046 ifeq (,$(PYTHON_FOR_BUILD))
4048 define gb_ExternalExecutable__register_python
4049 ifeq ($(OS),MACOSX)
4051 # use set_external, to avoid having the command added as prerequisite for the
4052 # targets that make use of it. (Otherwise make will choke as it doesn't have a
4053 # matching rule to build that specific file)
4054 $(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))
4055 # the Zip ensures that internal python has been built (cannot use the Package
4056 # target, as that is not used on Mac)
4057 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_get_target_for_build,python3))
4059 else
4061 $(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
4062 $(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
4063 $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
4065 endif
4067 endef
4069 else
4071 define gb_ExternalExecutable__register_python
4072 $(call gb_ExternalExecutable_set_external,python,$(PYTHON_FOR_BUILD))
4073 $(call gb_ExternalExecutable_set_precommand,python,PYTHONPATH=$$$$PYTHONPATH$$$${PYTHONPATH:+$$$${PYPATH:+:}}$$$$PYPATH)
4075 endef
4077 endif # PYTHON_FOR_BUILD
4079 ifneq ($(SYSTEM_GENBRK),)
4081 define gb_ExternalExecutable__register_genbrk
4082 $(call gb_ExternalExecutable_set_external,genbrk,$(SYSTEM_GENBRK))
4084 endef
4086 else # ! SYSTEM_GENBRK
4088 define gb_ExternalExecutable__register_genbrk
4089 $(call gb_ExternalExecutable_set_internal,genbrk,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genbrk$(gb_Executable_EXT_for_build),icu)
4090 $(call gb_ExternalExecutable_set_precommand,genbrk,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4091 $(call gb_ExternalExecutable_add_dependencies,genbrk,\
4092 $(call gb_Package_get_target_for_build,icu) \
4093 $(call gb_Package_get_target_for_build,icu_ure) \
4096 endef
4098 endif
4100 ifneq ($(SYSTEM_GENCCODE),)
4102 define gb_ExternalExecutable__register_genccode
4103 $(call gb_ExternalExecutable_set_external,genccode,$(SYSTEM_GENCCODE))
4105 endef
4107 else # ! SYSTEM_GENCCODE
4109 define gb_ExternalExecutable__register_genccode
4110 $(call gb_ExternalExecutable_set_internal,genccode,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/genccode$(gb_Executable_EXT_for_build),icu)
4111 $(call gb_ExternalExecutable_set_precommand,genccode,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4112 $(call gb_ExternalExecutable_add_dependencies,genccode,\
4113 $(call gb_Package_get_target_for_build,icu) \
4114 $(call gb_Package_get_target_for_build,icu_ure) \
4117 endef
4119 endif
4121 ifneq ($(SYSTEM_GENCMN),)
4123 define gb_ExternalExecutable__register_gencmn
4124 $(call gb_ExternalExecutable_set_external,gencmn,$(SYSTEM_GENCMN))
4126 endef
4128 else # ! SYSTEM_GENCMN
4130 define gb_ExternalExecutable__register_gencmn
4131 $(call gb_ExternalExecutable_set_internal,gencmn,$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/bin/gencmn$(gb_Executable_EXT_for_build),icu)
4132 $(call gb_ExternalExecutable_set_precommand,gencmn,$(subst $$,$$$$,$(gb_ICU_PRECOMMAND)))
4133 $(call gb_ExternalExecutable_add_dependencies,gencmn,\
4134 $(call gb_Package_get_target_for_build,icu) \
4135 $(call gb_Package_get_target_for_build,icu_ure) \
4138 endef
4140 endif
4142 ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
4144 $(eval $(call gb_Helper_register_jars,OXT,\
4145 owncloud-android-library \
4148 define gb_Jar__use_owncloud_android_lib
4149 $(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
4150 $(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
4151 endef
4152 define gb_ExternalProject__use_owncloud_android_lib
4153 $(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
4154 endef
4156 endif
4158 ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
4159 ifneq ($(SYSTEM_BZIP2),)
4161 define gb_LinkTarget__use_bzip2
4162 $(call gb_LinkTarget_set_include,$(1),\
4163 $(BZIP2_CFLAGS) \
4164 $$(INCLUDE) \
4166 $(call gb_LinkTarget_add_libs,$(1),$(BZIP2_LIBS))
4168 endef
4170 gb_ExternalProject__use_bzip2 :=
4172 else # !SYSTEM_BZIP2
4174 define gb_LinkTarget__use_bzip2
4175 $(call gb_LinkTarget_set_include,$(1),\
4176 -I$(call gb_UnpackedTarball_get_dir,bzip2) \
4177 $$(INCLUDE) \
4180 ifeq ($(COM),MSC)
4181 $(call gb_LinkTarget_add_libs,$(1),\
4182 $(call gb_UnpackedTarball_get_dir,bzip2)/libbz2.lib \
4184 else
4185 $(call gb_LinkTarget_add_libs,$(1),\
4186 -L$(call gb_UnpackedTarball_get_dir,bzip2) -lbz2 \
4188 endif
4190 $(call gb_LinkTarget_use_external_project,$(1),bzip2)
4191 endef
4193 define gb_ExternalProject__use_bzip2
4194 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
4195 endef
4197 endif
4198 endif
4200 define gb_LinkTarget__use_clew
4201 $(call gb_LinkTarget_set_include,$(1), \
4202 -I$(SRCDIR)/external/clew/source/include \
4203 $$(INCLUDE) \
4205 $(call gb_LinkTarget_use_libraries,$(1),clew)
4206 endef
4208 ifneq ($(ENABLE_PDFIUM),)
4209 define gb_LinkTarget__use_pdfium
4210 $(call gb_LinkTarget_set_include,$(1),\
4211 -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
4212 $$(INCLUDE) \
4214 $(call gb_LinkTarget_use_libraries,$(1),pdfium)
4215 endef
4216 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
4217 pdfium \
4219 endif
4221 $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
4222 $(if $(UCRT_REDISTDIR),ucrt) \
4225 # vim: set noet sw=4 ts=4: