[Libreoffice-commits] .: Branch 'libreoffice-3-4' - configure.in set_soenv.in solenv/inc
Petr Mladek
pmladek at kemper.freedesktop.org
Tue Oct 25 02:23:31 PDT 2011
configure.in | 52 +++++++++++++++++++++++++++++++++++++++++++----
set_soenv.in | 11 +++++++++
solenv/inc/set_wntx64.mk | 4 +--
3 files changed, 61 insertions(+), 6 deletions(-)
New commits:
commit a11c44b86e4459b6366b347e0406a860c80e0379
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Tue Oct 25 11:20:32 2011 +0200
Fix building of the 64-bit Windows Explorer extension (fdo#36950)
Don't confuse the 64-bit Explorer extension with a 64-bit LibreOffice,
which is unfinished and highly experimental work. OOo has been
building and distributing a 64-bit Explorer extension since long, and
we should too. They used some secret Hamburg sauce when building it,
though, but hopefully now it works here, too.
Signed-off-by: Petr Mladek <pmladek at suse.cz>
diff --git a/configure.in b/configure.in
index 3402424..1c88874 100755
--- a/configure.in
+++ b/configure.in
@@ -459,7 +459,7 @@ AC_ARG_ENABLE(zenity,
AC_ARG_ENABLE(cl-x64,
AS_HELP_STRING([--enable-cl-x64],
- [Use the Microsoft C/C++ x64 compiler instead of the default x86 one.]),
+ [Build a 64-bit LibreOffice using the Microsoft C/C++ x64 compiler.]),
,)
AC_ARG_ENABLE(extra-gallery,
@@ -1595,8 +1595,8 @@ if test "$_os" = "WINNT"; then
dnl Include twain scanners
BUILD_TYPE="$BUILD_TYPE TWAIN"
- dnl Set the CL_X64 variable.
- AC_MSG_CHECKING([whether to use the Microsoft C/C++ x64 compiler])
+ dnl Set the CL_X64 variable if we are building a 64-bit LibreOffice.
+ AC_MSG_CHECKING([whether to build a 64-bit LibreOffice])
if test "z$enable_cl_x64" = "z" -o "$enable_cl_x64" = "no"; then
CL_X64=""
AC_MSG_RESULT([no])
@@ -2236,7 +2236,7 @@ if test "$_os" = "WINNT"; then
export INCLUDE=`cygpath -d "$COMPATH/Include"`
dnl Check which Microsoft C/C++ compiler is found
AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler])
-dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out.
++ # The following finds Microsoft, matches nn.nn.nnnn then pulls numbers out.
CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ {
x = match( \\\$0, /..\\...\\...../ )
CCversion = substr( \\\$0, RSTART, RLENGTH)
@@ -2271,6 +2271,50 @@ dnl The following find microsoft, matches nn.nn.nnnn then pulls numbers out
else
AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
fi
+
+ # Check for 64-bit (cross-)compiler to use to build the 64-bit
+ # version of the Explorer extension (and maybe other small
+ # bits, too) needed when installing a 32-bit LibreOffice on a
+ # 64-bit OS. The 64-bit Explorer extension is a feature that
+ # has been present since long in OOo. Don't confuse it with
+ # building LibreOffice itself as 64-bit code, which is
+ # unfished work and highly experimental.
+
+ AC_MSG_CHECKING([for a x64 compiler])
+ BUILD_X64=
+ CC_X64_BINARY=
+ LINK_X64_BINARY=
+ LIBMGR_X64_BINARY=
+
+ # Prefer native x64 compiler to cross-compiler, in case we are running
+ # the build on a 64-bit OS.
+ if "$with_cl_home/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
+ BUILD_X64=TRUE
+ CC_X64_BINARY="$with_cl_home/bin/amd64/cl.exe"
+ CXX_X64_BINARY="$with_cl_home/bin/amd64/cl.exe"
+ LINK_X64_BINARY="$with_cl_home/bin/amd64/link.exe"
+ LIBMGR_X64_BINARY="$with_cl_home/bin/amd64/lib.exe"
+ elif "$with_cl_home/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
+ BUILD_X64=TRUE
+ CC_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe"
+ CXX_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe"
+ LINK_X64_BINARY="$with_cl_home/bin/x86_amd64/link.exe"
+ LIBMGR_X64_BINARY="$with_cl_home/bin/x86_amd64/lib.exe"
+ fi
+ if test "$BUILD_X64" = TRUE; then
+ AC_MSG_RESULT([found])
+ else
+ AC_MSG_RESULT([not found])
+ AC_MSG_WARN([Installation set will not contain the 64-bit Explorer extension])
+ fi
+ AC_SUBST(BUILD_X64)
+
+ # These are passed to the environment through set_soenv.in as usual, and then
+ # used in set_wntx64.mk
+ AC_SUBST(CC_X64_BINARY)
+ AC_SUBST(CXX_X64_BINARY)
+ AC_SUBST(LINK_X64_BINARY)
+ AC_SUBST(LIBMGR_X64_BINARY)
else
AC_MSG_CHECKING([the MinGW C++ Compiler])
if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then
diff --git a/set_soenv.in b/set_soenv.in
index e1ac522..7e0542f 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1770,6 +1770,17 @@ if ( $platform =~ m/cygwin/ )
ToFile( "DISABLE_ACTIVEX", "@DISABLE_ACTIVEX@","e" );
ToFile( "DISABLE_ATL", "@DISABLE_ATL@","e" );
ToFile( "USE_NEW_SDK", $USE_NEW_SDK, "e" );
+ # Variables used when building the parts that needs to be available
+ # also as 64-bit versions in a 32-bit LibreOffice build, like
+ # the Explorer extension. If the configure script hasn't
+ # found the 64-bit (cross-)compiler, then @BUILD_X64@ will be empty.
+ ToFile( "BUILD_X64", "@BUILD_X64@", "e" );
+ if ( "@BUILD_X64@" eq "TRUE" ) {
+ ToFile( "CC_X64_BINARY", "@CC_X64_BINARY@", "e" );
+ ToFile( "CXX_X64_BINARY","@CXX_X64_BINARY@", "e" );
+ ToFile( "LINK_X64_BINARY","@LINK_X64_BINARY@","e" );
+ ToFile( "LIBMGR_X64_BINARY","@LIBMGR_X64_BINARY@","e" );
+ }
# Hack around dmake's mktmp not generating DOS paths.
my $tmpdir = qx{cygpath -m "/tmp"};
diff --git a/solenv/inc/set_wntx64.mk b/solenv/inc/set_wntx64.mk
index e14c94d..3aececd 100755
--- a/solenv/inc/set_wntx64.mk
+++ b/solenv/inc/set_wntx64.mk
@@ -46,7 +46,7 @@ USE_CFLAGS_X64=-c -nologo -Gs $(NOLOGO) -Zm500 -Zc:forScope,wchar_t- -GR
# Stack buffer overrun detection.
CFLAGS+=-GS
-USE_CDEFS_X64+= -DWIN32 -D_AMD64_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS
+USE_CDEFS_X64+= -D$(OS) -D$(GUI) -D$(GVER) -D$(COM) -DX86_64 -DWIN32 -D_AMD64_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS
.IF "$(debug)"!=""
USE_CFLAGS_X64+=-Zi -Fd$(MISC_X64)/$(@:b).pdb
USE_CDEFS_X64+=-DDEBUG
@@ -114,7 +114,7 @@ STDSLOCUI_X64=
IMPLIBFLAGS_X64=-machine:X64
-LIBPATH_X64=$(PSDK)/lib/x64
+LIBPATH_X64=$(PSDK_HOME)/lib/x64
LIBPATH_VC_X64=$(COMPATH)/lib/amd64
ADVAPI32LIB_X64=$(LIBPATH_X64)/advapi32.lib
More information about the Libreoffice-commits
mailing list