Implement --disable-liblangtag, to be able to build without that.
Change-Id: Ic38d0282dba99efe2ecc45142a927ba3d8fa167d
This commit is contained in:
parent
26310504c3
commit
6a7b32b09e
@ -462,6 +462,8 @@ endef
|
||||
endif # SYSTEM_GLIB
|
||||
|
||||
|
||||
ifeq ($(ENABLE_LIBLANGTAG),YES)
|
||||
|
||||
ifeq ($(SYSTEM_LIBLANGTAG),YES)
|
||||
|
||||
define gb_LinkTarget__use_liblangtag
|
||||
@ -495,6 +497,8 @@ endef
|
||||
|
||||
endif # SYSTEM_LIBLANGTAG
|
||||
|
||||
endif # ENABLE_LIBLANGTAG
|
||||
|
||||
|
||||
ifeq ($(SYSTEM_NEON),YES)
|
||||
|
||||
|
@ -125,6 +125,7 @@ export ENABLE_TDE=@ENABLE_TDE@
|
||||
export ENABLE_KAB=@ENABLE_KAB@
|
||||
export ENABLE_KDE4=@ENABLE_KDE4@
|
||||
export ENABLE_KDE=@ENABLE_KDE@
|
||||
export ENABLE_LIBLANGTAG=@ENABLE_LIBLANGTAG@
|
||||
export ENABLE_LIBRSVG=@ENABLE_LIBRSVG@
|
||||
export ENABLE_LOCKDOWN=@ENABLE_LOCKDOWN@
|
||||
export ENABLE_LOMENUBAR=@ENABLE_LOMENUBAR@
|
||||
|
50
configure.in
50
configure.in
@ -1066,6 +1066,12 @@ AC_ARG_ENABLE(winegcc,
|
||||
needed for MinGW cross-compilation.]),
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(liblangtag,
|
||||
AS_HELP_STRING([--disable-liblangtag],
|
||||
[Disable use of liblangtag, and insted use an own simple
|
||||
implementation.]),
|
||||
)
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Optional Packages (--with/without-)
|
||||
dnl ===================================================================
|
||||
@ -11084,38 +11090,34 @@ else
|
||||
fi
|
||||
AC_SUBST(SYSTEM_GLIB)
|
||||
|
||||
dnl Get system's glib flags and libs.
|
||||
dnl The i18npool LanguageTag wrapper uses it for liblangtag.
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Test whether to use liblangtag
|
||||
dnl ===================================================================
|
||||
ENABLE_LIBLANGTAG=
|
||||
SYSTEM_LIBLANGTAG=
|
||||
GLIB_CFLAGS=''
|
||||
GLIB_LIBS=''
|
||||
if test "$SYSTEM_GLIB" = YES; then
|
||||
PKG_CHECK_MODULES( GLIB, glib-2.0 )
|
||||
else
|
||||
case "$_os" in
|
||||
iOS|Android)
|
||||
;;
|
||||
*)
|
||||
if test "$enable_liblangtag" = "yes" -o \( "$enable_liblangtag" = "" -a "$CROSS_COMPILING" != "YES" \); then
|
||||
ENABLE_LIBLANGTAG=YES
|
||||
dnl Get system's glib flags and libs.
|
||||
dnl The i18npool LanguageTag wrapper uses it for liblangtag.
|
||||
|
||||
if test "$SYSTEM_GLIB" = YES; then
|
||||
PKG_CHECK_MODULES( GLIB, glib-2.0 )
|
||||
else
|
||||
BUILD_TYPE="$BUILD_TYPE GLIB"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
dnl So far AFAIK no system has liblangtag, set this unconditionally for now.
|
||||
dnl TODO Allow system liblangtag
|
||||
BUILD_TYPE="$BUILD_TYPE LIBLANGTAG"
|
||||
fi
|
||||
AC_SUBST(ENABLE_LIBLANGTAG)
|
||||
AC_SUBST(SYSTEM_LIBLANGTAG)
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
|
||||
dnl So far AFAIK no system has liblangtag, set this unconditionally for now.
|
||||
dnl Except for Android and iOS where we don't want liblangtag.
|
||||
|
||||
SYSTEM_LIBLANGTAG=NO
|
||||
case "$_os" in
|
||||
iOS|Android)
|
||||
;;
|
||||
*)
|
||||
BUILD_TYPE="$BUILD_TYPE LIBLANGTAG"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(SYSTEM_LIBLANGTAG)
|
||||
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Test whether to build gettext runtime (libintl) or rely on the
|
||||
|
@ -54,12 +54,11 @@ $(eval $(call gb_Library_add_exception_objects,i18nisolang1,\
|
||||
))
|
||||
|
||||
|
||||
ifneq ($(OS),ANDROID)
|
||||
ifneq ($(OS),IOS)
|
||||
ifeq ($(ENABLE_LIBLANGTAG),YES)
|
||||
$(eval $(call gb_Library_add_defs,i18nisolang1,-DENABLE_LIBLANGTAG))
|
||||
$(eval $(call gb_Library_use_external,i18nisolang1,glib))
|
||||
$(eval $(call gb_Library_use_external,i18nisolang1,liblangtag))
|
||||
endif
|
||||
endif
|
||||
|
||||
$(eval $(call gb_Library_use_external,i18nisolang1,libxml2))
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
//#define erDEBUG
|
||||
|
||||
#if !defined(ANDROID) && !defined(IOS)
|
||||
#ifdef ENABLE_LIBLANGTAG
|
||||
#include <liblangtag/langtag.h>
|
||||
#else
|
||||
/* Replacement code for LGPL phobic and Android systems.
|
||||
|
@ -26,9 +26,9 @@ LIBLANGTAG_MICRO=0
|
||||
|
||||
# --- Files --------------------------------------------------------
|
||||
|
||||
.IF "$(SYSTEM_LIBLANGTAG)" == "YES"
|
||||
.IF "$(ENABLE_LIBLANGTAG)" != "YES" || "$(SYSTEM_LIBLANGTAG)" == "YES"
|
||||
@all:
|
||||
@echo "Using system liblangtag."
|
||||
@echo "Not building liblangtag."
|
||||
.ENDIF
|
||||
|
||||
TARFILE_NAME=liblangtag-$(LIBLANGTAG_MAJOR).$(LIBLANGTAG_MINOR)
|
||||
|
@ -42,6 +42,7 @@ $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
|
||||
ENABLE_KAB \
|
||||
ENABLE_KDE \
|
||||
ENABLE_KDE4 \
|
||||
ENABLE_LIBLANGTAG \
|
||||
ENABLE_LOMENUBAR \
|
||||
ENABLE_NSPLUGIN \
|
||||
ENABLE_ONLINE_UPDATE \
|
||||
|
@ -671,7 +671,7 @@ Directory gid_Dir_Share_Autocorr
|
||||
Styles = (WORKSTATION, CREATE);
|
||||
End
|
||||
|
||||
#ifndef SYSTEM_LIBLANGTAG
|
||||
#if defined( ENABLE_LIBLANGTAG ) && !defined( SYSTEM_LIBLANGTAG )
|
||||
Directory gid_Dir_Share_Liblangtag
|
||||
ParentID = gid_Brand_Dir_Share;
|
||||
DosName = "liblangtag";
|
||||
|
@ -144,7 +144,7 @@ File gid_File_Extra_Glas_Red_Zip
|
||||
Name = "glas-red.zip";
|
||||
End
|
||||
|
||||
#ifndef SYSTEM_LIBLANGTAG
|
||||
#if defined( ENABLE_LIBLANGTAG ) && !defined( SYSTEM_LIBLANGTAG )
|
||||
File gid_File_Extra_Liblangtag
|
||||
Dir = gid_Dir_Share_Liblangtag;
|
||||
USER_FILE_BODY;
|
||||
|
@ -758,7 +758,7 @@ End
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef SYSTEM_LIBLANGTAG
|
||||
#if defined( ENABLE_LIBLANGTAG ) && !defined( SYSTEM_LIBLANGTAG )
|
||||
|
||||
File gid_File_Lib_Langtag
|
||||
LIB_FILE_BODY;
|
||||
@ -774,7 +774,7 @@ File gid_File_Lib_Langtag
|
||||
#endif
|
||||
End
|
||||
|
||||
#endif // SYSTEM_LIBLANGTAG
|
||||
#endif // ENABLE_LIBLANGTAG
|
||||
|
||||
|
||||
#ifdef SOLAR_JAVA
|
||||
|
Loading…
x
Reference in New Issue
Block a user