Make libatomic_ops buildable and enable on non-X86.
Change-Id: Iec1d329f143ab76de7e8b4acd3da66efb6e0220c Reviewed-on: https://gerrit.libreoffice.org/5812 Reviewed-by: Andrzej J.R. Hunt <andrzej@ahunt.org> Tested-by: Andrzej J.R. Hunt <andrzej@ahunt.org> Reviewed-on: https://gerrit.libreoffice.org/6600
This commit is contained in:
parent
628a812db0
commit
f479f62c14
4 changed files with 34 additions and 18 deletions
|
@ -703,15 +703,10 @@ $(LIBATOMIC_OPS_CFLAGS) \
|
|||
$(call gb_LinkTarget_use_external_project,$(1),\
|
||||
libatomic_ops \
|
||||
)
|
||||
ifeq ($(COM),MSC)
|
||||
|
||||
$(call gb_LinkTarget_add_libs,$(1),\
|
||||
$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib/.libs/libatomic_ops-7.2d.lib \
|
||||
-L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib -latomic_ops \
|
||||
)
|
||||
else
|
||||
$(call gb_LinkTarget_add_libs,$(1),\
|
||||
-L$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src/lib/.libs -latomic_ops-7.2d \
|
||||
)
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
|
|
27
configure.ac
27
configure.ac
|
@ -8468,14 +8468,22 @@ if test "x$enable_firebird_sdbc" = "xyes"; then
|
|||
elif test "$cross_compiling" = "yes"; then
|
||||
AC_MSG_RESULT([none])
|
||||
else
|
||||
dnl ===================================================================
|
||||
dnl Check for system libatomic-ops
|
||||
dnl ===================================================================
|
||||
libo_CHECK_SYSTEM_MODULE([libatomic_ops],[ATOMIC_OPS],[atomic_ops >= 0.7.2])
|
||||
if test "$with_system_libatomic_ops" = "yes"; then
|
||||
SYSTEM_LIBATOMIC_OPS=YES
|
||||
AC_CHECK_HEADERS(atomic_ops.h, [],
|
||||
[AC_MSG_ERROR(atomic_ops.h not found. install libatomic-ops)], [])
|
||||
dnl We need libatomic-ops for any non X86/X64 system
|
||||
if test "$CPU" != I -a "$CPU" != X; then
|
||||
dnl ===================================================================
|
||||
dnl Check for system libatomic-ops
|
||||
dnl ===================================================================
|
||||
libo_CHECK_SYSTEM_MODULE([libatomic_ops],[ATOMIC_OPS],[atomic_ops >= 0.7.2])
|
||||
if test "$with_system_libatomic_ops" = "yes"; then
|
||||
SYSTEM_LIBATOMIC_OPS=YES
|
||||
AC_CHECK_HEADERS(atomic_ops.h, [],
|
||||
[AC_MSG_ERROR(atomic_ops.h not found. install libatomic-ops)], [])
|
||||
else
|
||||
SYSTEM_LIBATOMIC_OPS=NO
|
||||
LIBATOMIC_OPS_CFLAGS="-I${WORKDIR}/UnpackedTarball/libatomic_ops/include"
|
||||
LIBATOMIC_OPS_LIBS="-latomic_ops"
|
||||
BUILD_TYPE="$BUILD_TYPE LIBATOMIC_OPS"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([internal])
|
||||
|
@ -8489,6 +8497,9 @@ if test "x$enable_firebird_sdbc" = "xyes"; then
|
|||
|
||||
fi
|
||||
AC_SUBST(ENABLE_FIREBIRD_SDBC)
|
||||
AC_SUBST(SYSTEM_LIBATOMIC_OPS)
|
||||
AC_SUBST(LIBATOMIC_OPS_CFLAGS)
|
||||
AC_SUBST(LIBATOMIC_OPS_LIBS)
|
||||
AC_SUBST(SYSTEM_FIREBIRD)
|
||||
AC_SUBST(FIREBIRD_CFLAGS)
|
||||
AC_SUBST(FIREBIRD_LIBS)
|
||||
|
|
12
external/firebird/ExternalProject_firebird.mk
vendored
12
external/firebird/ExternalProject_firebird.mk
vendored
|
@ -29,16 +29,22 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
|
|||
$(call gb_ExternalProject_run,build,\
|
||||
unset MAKEFLAGS \
|
||||
&& export PKG_CONFIG="" \
|
||||
&& export CPPFLAGS=" \
|
||||
$(if $(filter NO,$(SYSTEM_LIBATOMIC_OPS)), \
|
||||
-I$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src \
|
||||
,$(LIBATOMIC_OPS_CFLAGS)) \
|
||||
" \
|
||||
&& export CXXFLAGS=" \
|
||||
$(if $(filter NO,$(SYSTEM_BOOST)), \
|
||||
-I$(call gb_UnpackedTarball_get_dir,boost),$(BOOST_CPPFLAGS) \
|
||||
-L$(call gb_UnpackedTarball_get_dir,boost)/source/lib) \
|
||||
-I$(call gb_UnpackedTarball_get_dir,boost) \
|
||||
-L$(call gb_UnpackedTarball_get_dir,boost)/source/lib \
|
||||
,$(BOOST_CPPFLAGS)) \
|
||||
$(if $(filter NO,$(SYSTEM_ICU)), \
|
||||
-I$(call gb_UnpackedTarball_get_dir,icu)/source \
|
||||
-I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
|
||||
-I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
|
||||
-L$(call gb_UnpackedTarball_get_dir,icu)/source/lib \
|
||||
,$(ICU_CPPFLAGS)) \
|
||||
-L$(call gb_UnpackedTarball_get_dir,icu)/source/lib \
|
||||
" \
|
||||
&& ./configure \
|
||||
--without-editline \
|
||||
|
|
|
@ -9,9 +9,13 @@
|
|||
|
||||
$(eval $(call gb_Module_Module,libatomic_ops))
|
||||
|
||||
ifeq ($(SYSTEM_LIBATOMIC_OPS),NO)
|
||||
|
||||
$(eval $(call gb_Module_add_targets,libatomic_ops,\
|
||||
ExternalProject_libatomic_ops \
|
||||
UnpackedTarball_libatomic_ops \
|
||||
))
|
||||
|
||||
endif
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
|
Loading…
Reference in a new issue