[Libreoffice-commits] core.git: 7 commits - compilerplugins/Makefile-clang.mk configure.ac external/libxml2 external/libxmlsec

Michael Stahl mstahl at redhat.com
Thu Jan 9 15:27:15 PST 2014


 compilerplugins/Makefile-clang.mk            |    5 +++--
 configure.ac                                 |   25 +++++++++++++++++++------
 external/libxml2/ExternalProject_xml2.mk     |    2 ++
 external/libxmlsec/ExternalProject_xmlsec.mk |    2 +-
 4 files changed, 25 insertions(+), 9 deletions(-)

New commits:
commit 415dfd0d89f550268dc66d4e7d447c1975a8aa44
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jan 9 22:34:45 2014 +0100

    configure: check for ICE and SM libraries too
    
    Change-Id: Id86b09c9f2fe8770da8cc6b13672e2bf37201962

diff --git a/configure.ac b/configure.ac
index 689b122..f41c691 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9263,6 +9263,14 @@ if test "$WANT_X11" = "yes"; then
     dnl ===================================================================
     AC_CHECK_HEADERS(X11/extensions/shape.h,[],[AC_MSG_ERROR([libXext headers not found])],
      [#include <X11/extensions/shape.h>])
+
+    # vcl needs ICE and SM
+    AC_CHECK_HEADERS(X11/ICE/ICElib.h,[],[AC_MSG_ERROR([libICE headers not found])])
+    AC_CHECK_LIB([ICE], [IceConnectionNumber], [:],
+        [AC_MSG_ERROR(ICE library not found)])
+    AC_CHECK_HEADERS(X11/SM/SMlib.h,[],[AC_MSG_ERROR([libSM headers not found])])
+    AC_CHECK_LIB([SM], [SmcOpenConnection], [:],
+        [AC_MSG_ERROR(SM library not found)])
 fi
 
 dnl ===================================================================
commit 3b3c8c4796a89a76ce7574908096a91993412523
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jan 9 22:10:23 2014 +0100

    configure: we need both cups header and library
    
    Change-Id: Ie27a67b7d1086fbbce5eb40a56b4d154afb3faf8

diff --git a/configure.ac b/configure.ac
index 276d93f..689b122 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4688,7 +4688,7 @@ if test "$test_cups" = "yes"; then
     AC_MSG_CHECKING([whether cups support is present])
     AC_CHECK_LIB([cups], [cupsPrintFiles], [:])
     AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
-    if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -a "$ac_cv_header_cups_cups_h" != "yes"; then
+    if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -o "$ac_cv_header_cups_cups_h" != "yes"; then
         AC_MSG_ERROR([Could not find CUPS. Install libcupsys2-dev or cups-devel.])
     fi
 
commit e32f828e2b7a136ac255bfe1cc7e4858fa965e8d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jan 9 22:01:48 2014 +0100

    libxmlsec: openssl conditional was accidentally inverted
    
    ... in commit bf6d1f77420dcc9ece4d9f4eae1e37b427d85c6a.  And it just
    happens to not build with clang here.
    
    Change-Id: Ic467abc894b9c98c81fa64cb57eafaa4cfcaa66e

diff --git a/external/libxmlsec/ExternalProject_xmlsec.mk b/external/libxmlsec/ExternalProject_xmlsec.mk
index dc79899..2c4b18a 100644
--- a/external/libxmlsec/ExternalProject_xmlsec.mk
+++ b/external/libxmlsec/ExternalProject_xmlsec.mk
@@ -55,7 +55,7 @@ $(call gb_ExternalProject_get_state_target,xmlsec,build) :
 		autoreconf \
 		&& ./configure \
 			--with-pic --disable-shared --disable-crypto-dl --without-libxslt --without-gnutls \
-			$(if $(filter ANDROID,$(OS)),$(if $(DISABLE_OPENSSL),--without-openssl,--with-openssl=$(call gb_UnpackedTarball_get_dir,openssl))) \
+			$(if $(or $(filter-out ANDROID,$(OS)),$(DISABLE_OPENSSL)),--without-openssl,--with-openssl=$(call gb_UnpackedTarball_get_dir,openssl)) \
 			$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
 			$(if $(filter NO,$(SYSTEM_NSS))$(filter MACOSX,$(OS)),--disable-pkgconfig) \
 			$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
commit 1366a41c320a9bb173dc5e066ab532d679d89bcc
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jan 9 21:42:19 2014 +0100

    configure: ENABLE_NPAPI_FROM_BROWSER requires Xt library
    
    Change-Id: I023927897787ae046baf2751d0e56bfca3fb688f

diff --git a/configure.ac b/configure.ac
index d757466..276d93f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9254,6 +9254,10 @@ if test "$WANT_X11" = "yes"; then
     AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])],
      [#include <X11/Intrinsic.h>])
 
+    # ENABLE_NPAPI_FROM_BROWSER requires Xt library
+    AC_CHECK_LIB([Xt], [XtToolkitInitialize], [:],
+        [AC_MSG_ERROR(Xt library not found)])
+
     dnl ===================================================================
     dnl Check for extension headers
     dnl ===================================================================
commit 92a1e544f67eae888517fcfa52d45e9530403a81
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jan 9 21:28:40 2014 +0100

    configure: no Xinerama on Darwin
    
    Change-Id: Iad86269939cd75f9158f86e6da04952f85868e5a

diff --git a/configure.ac b/configure.ac
index 1b81ee1..d757466 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11650,11 +11650,7 @@ fi
 AC_SUBST(ENABLE_SILENT_MSI)
 
 AC_MSG_CHECKING([whether and how to use Xinerama])
-if test "$_os" = "Darwin"; then
-    USE_XINERAMA=YES
-    XINERAMA_LINK=dynamic
-    AC_MSG_RESULT([yes])
-elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
+if test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
     if test "$x_libraries" = "default_x_libraries"; then
         XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
         if test "x$XINERAMALIB" = x; then
commit b202af672cf7d1825b68adc352374031bf68c6f2
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jan 9 21:14:48 2014 +0100

    libxml2: don't grow dependency on liblzma if that happens to be installed
    
    Change-Id: Ifd46fc5dc531bd5bdb489c7550476f9c07a0a976

diff --git a/external/libxml2/ExternalProject_xml2.mk b/external/libxml2/ExternalProject_xml2.mk
index a2d613d..5d8eba4 100644
--- a/external/libxml2/ExternalProject_xml2.mk
+++ b/external/libxml2/ExternalProject_xml2.mk
@@ -18,6 +18,7 @@ ifeq ($(COM),GCC)
 $(call gb_ExternalProject_get_state_target,xml2,build):
 	$(call gb_ExternalProject_run,build,\
 		./configure --disable-ipv6 --without-python --without-zlib \
+			--without-lzma \
 			--disable-static --without-debug lt_cv_cc_dll_switch="-shared" \
 			$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
 			CC="$(CC) -mthreads $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \
@@ -39,6 +40,7 @@ else # OS!=WNT
 $(call gb_ExternalProject_get_state_target,xml2,build):
 	$(call gb_ExternalProject_run,build,\
 		./configure --disable-ipv6 --without-python --without-zlib --with-sax1 \
+			--without-lzma \
 			$(if $(debug),--with-run-debug) \
 			$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
 			$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________URELIB) \
commit 3bdb781018c9a9a6778b1771a3e9346c2426e4f2
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jan 9 21:20:44 2014 +0100

    compilerplugins: strip out -m32/-m64 from CXX
    
    These are not part of LO and need to be built with native bitness
    of the compiler.
    
    Change-Id: I41fdec130a63e0c0d07f1df228031014cd2351c2

diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index 82a4351..1121d32 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -9,6 +9,7 @@
 # Make sure variables in this Makefile do not conflict with other variables (e.g. from gbuild).
 
 # You may occassionally want to override some of these
+CLANGCXX=$(filter-out -m32 -m64,$(CXX))
 
 # Compile flags ('make CLANGCXXFLAGS=-g' if you need to debug the plugin)
 CLANGCXXFLAGS=-O2 -Wall -Wextra -g
@@ -73,7 +74,7 @@ CLANGOBJS=
 define clangbuildsrc
 $(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp
 	@echo [build CXX] $(subst $(SRCDIR)/,,$(2))
-	$(QUIET)$(CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) $(CLANGDEFS) $(CLANGINCLUDES) -I$(BUILDDIR)/config_host $(2) -fPIC $(CXXFLAGS_CXX11) -c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
+	$(QUIET)$(CLANGCXX) $(CLANGCXXFLAGS) $(CLANGWERROR) $(CLANGDEFS) $(CLANGINCLUDES) -I$(BUILDDIR)/config_host $(2) -fPIC $(CXXFLAGS_CXX11) -c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
 
 -include $(CLANGOUTDIR)/$(1).d
 
@@ -85,7 +86,7 @@ $(foreach src, $(CLANGSRC), $(eval $(call clangbuildsrc,$(src),$(CLANGINDIR)/$(s
 
 $(CLANGOUTDIR)/plugin.so: $(CLANGOBJS)
 	@echo [build LNK] $(subst $(BUILDDIR)/,,$@)
-	$(QUIET)$(CXX) -shared $(CLANGOBJS) -o $@
+	$(QUIET)$(CLANGCXX) -shared $(CLANGOBJS) -o $@
 
 # Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes.
 $(CLANGOUTDIR)/clang-timestamp: $(CLANGBUILD)/bin/clang
diff --git a/configure.ac b/configure.ac
index fcf8fd1..1b81ee1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5628,6 +5628,10 @@ if test "$COM_GCC_IS_CLANG" = "TRUE"; then
         fi
         AC_LANG_PUSH([C++])
         save_CPPFLAGS=$CPPFLAGS
+        save_CXX=$CXX
+        # compiler plugins must be built with "native" bitness of clang
+        # because they link against clang libraries
+        CXX=`echo $CXX | sed -e s/-m64// -e s/-m32//`
         CPPFLAGS="$CPPFLAGS -I$CLANGDIR/include -I$CLANGDIR/tools/clang/include -I$CLANGBUILD/include -I$CLANGBUILD/tools/clang/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
         AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h,
             [COMPILER_PLUGINS=TRUE],
@@ -5639,6 +5643,7 @@ if test "$COM_GCC_IS_CLANG" = "TRUE"; then
                 add_warning "Cannot find Clang headers to build compiler plugins, plugins disabled."
             fi
             ])
+        CXX=$save_CXX
         CPPFLAGS=$save_CPPFLAGS
         AC_LANG_POP([C++])
     fi


More information about the Libreoffice-commits mailing list