[Libreoffice-commits] .: 3 commits - configure.in download set_soenv.in solenv/inc

Tor Lillqvist tml at kemper.freedesktop.org
Tue May 17 12:36:53 PDT 2011


 configure.in          |   77 +++++++++++++++++++++++++++++---------------------
 download              |   18 +++++++++++
 set_soenv.in          |    2 -
 solenv/inc/wntgcci.mk |   13 +++-----
 4 files changed, 67 insertions(+), 43 deletions(-)

New commits:
commit 5ff8a55b0ddcda9fa962f87b3d2be519760d8fc9
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue May 17 22:32:11 2011 +0300

    No need to use -nostdinc

diff --git a/solenv/inc/wntgcci.mk b/solenv/inc/wntgcci.mk
index b008dd8..4db01f5 100644
--- a/solenv/inc/wntgcci.mk
+++ b/solenv/inc/wntgcci.mk
@@ -40,14 +40,11 @@ AFLAGS=/c /Cp /coff
 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
 ARCH_FLAGS*=-march=pentium
 
-CXX*=gcc
-### Der gcc vertraegt kein Semikolon im Include-Pfad         RT
-# old:
-#CFLAGS=-c -Wall -I$(INCLUDE) $(OLE2DEF)
-# new:
-#CYGINC=$(INCLUDE:s/-I /-I/:+"  ":s/;/ -I/:s/-I  //:s/   / /)
-CFLAGS=-fmessage-length=0 -c -nostdinc $(OLE2DEF)
-###
+CC*=i686-w64-mingw32-gcc
+CXX*=i686-w64-mingw32-g++
+
+CFLAGS+=-fmessage-length=0 -c
+
 CFLAGSCC=-pipe $(ARCH_FLAGS)
 CFLAGSCXX=-pipe $(ARCH_FLAGS)
 CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
commit fbd024a4a5f41a55b1cda1ff15829d8c58c10b70
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue May 17 22:30:52 2011 +0300

    Don't overwrite config.log from the configure script

diff --git a/download b/download
index c8a5ad8..c74e00e 100755
--- a/download
+++ b/download
@@ -273,5 +273,21 @@ done
 
 [ -x "post_download" ] || { echo "'post_download' script not found, run ./autogen.sh." ; exit 1 ; }
 
-./post_download --build=$BUILD_PLATFORM --host=$HOST_PLATFORM || exit 1
+# Save the config.log from the main configure script
+# and restore it after running post_download.
+mv config.log config.log.save
+
+./post_download --build=$BUILD_PLATFORM --host=$HOST_PLATFORM
+post_download_status=$?
+
+test -f config.log && mv config.log post_download.log
+mv config.log.save config.log
+
+exit $post_download_status
+
+# Local Variables:
+# tab-width: 4
+# indent-tabs-mode: nil
+# End:
+
 # vim:set shiftwidth=4 softtabstop=4 expandtab:
commit 1b6f0b8951ed197110de6cb430d20d8fcff7cebf
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue May 17 22:25:46 2011 +0300

    Make checks for db work when cross-compiling
    
    When looking for the db,h header, use Autoconf mechanisms instead of
    manual checks in hardcoded directories. So yeah, this means that you
    need to make sure the correct -I flag is passed if you have db
    installed in a weird place where the compiler doesn't find it.
    
    Use checks that require only compiling, not running code. Nice.
    
    Don't AC_SUBST variables that are not used.

diff --git a/configure.in b/configure.in
index 96961f5..6aa6d5b 100755
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,5 @@
-dnl configure.in serves as input for the GNU autoconf package
+dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil -*-
+dnl configure.in serves as input for the GNU autoconf package 
 dnl in order to create a configure script.
 
 AC_INIT([LibreOffice], [3.5],,, [http://documentfoundation.org/])
@@ -1668,6 +1669,7 @@ dnl Set up a different compiler to produce tools to run on the build
 dnl machine when doing cross-compilation
 dnl ===================================================================
 
+m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
 if test "$cross_compiling" = "yes"; then
   AC_MSG_CHECKING([for BUILD platform configuration])
   echo
@@ -1686,9 +1688,10 @@ if test "$cross_compiling" = "yes"; then
 	makefile.rc \
 	bin/repo-list.in | (cd $tmpdir && tar xf -)
   (
-    unset COM GUI GUIBASE OS CPU CPUNAME CC CXX CFLAGS
+    unset COM GUI GUIBASE OS CPU CPUNAME CC CXX CFLAGS PKG_CONFIG
     test -n "$CC_FOR_BUILD" && export CC="$CC_FOR_BUILD"
     test -n "$CXX_FOR_BUILD" && export CXX="$CXX_FOR_BUILD"
+    test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
     cd $tmpdir
     sub_conf_opts=""
     test -n $with_ant_home && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
@@ -4377,49 +4380,60 @@ fi
 AC_SUBST(SYSTEM_TRANSLATE_TOOLKIT)
 
 dnl ===================================================================
-dnl Check for system berkley db
+dnl Check for system Berkeley db
 dnl ===================================================================
 AC_MSG_CHECKING([which db to use])
 if test -n "$with_system_db" -o -n "$with_system_libs" && \
     test "$with_system_db" != "no"; then
     SYSTEM_DB=YES
     AC_MSG_RESULT([external])
-    for dbver in -5.1 5.1 -5.0 5.0 -5 5 -4.8 4.8 -4.7 4.7 -4 4 ''; do
-        AC_MSG_CHECKING([for db$dbver/db.h])
-        for inc_dir in /usr/include /usr/local/include /usr/pkg/include; do
-            if test -r "$inc_dir/db$dbver/db.h"; then
-                DB_INCLUDES="$inc_dir/db$dbver"
-                db_header="db$dbver/db.h"
-                AC_MSG_RESULT([yes])
-                break 2
-            fi
+
+    db_header=
+    for dbver in 5.1 5.0 5 4.8 4.7 4; do
+        for dash in - ''; do
+            AC_CHECK_HEADER([db$dash$dbver/db.h],
+                [ db_header="db$dash$dbver/db.h"; break ])
         done
-        AC_MSG_RESULT([no])
     done
 
-    if test "$db_header" = ""; then
-       AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include; db_header="db.h" ],
-           [ AC_MSG_ERROR(no. install the db4-dev package) ])
+    if test -z "$db_header"; then
+        AC_CHECK_HEADER([db/db.h], [db_header='db/db.h'])
+    fi
+
+    if test -z "$db_header"; then
+       AC_CHECK_HEADER(db.h, [ db_header='db.h' ])
     fi
+
+    if test -z "$db_header"; then
+        AC_MSG_ERROR([db.h not found. Use the correct -I flag, or install the Berkeley db development package.])
+    fi
+
     AC_MSG_CHECKING([whether db is at least 4.1])
-    AC_TRY_RUN([
-#include <$db_header>
+    AC_TRY_COMPILE([#include <$db_header>],
+        [int array[(DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1))-1];],
+        [AC_MSG_RESULT([yes])],
+        [AC_MSG_ERROR([no. you need at least db 4.1])])
 
-int main(int argc, char **argv) {
-       if(DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)) return 0;
-       else return 1;
-}
-    ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.1])])
     DB_LIB=
-    for dbver in '' -5.1 5.1 -5.0 5.0 -5 5 -4.8 4.8 -4.7 4.7 -4 4; do
-        AC_CHECK_LIB(db$dbver, dbopen, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ] ,
-            AC_CHECK_LIB(db$dbver, __db185_open, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ]
-            )
-        )
+    for dbver in 5.1 5.0 5 4.8 4.7 4 ''; do
+        for dash in - ''; do
+            AC_CHECK_LIB(db$dash$dbver, dbopen, 
+                [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ])
+            AC_CHECK_LIB(db$dash$dbver, __db185_open, 
+                [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ])
+         done
     done
+
+    if test -z "$DB_LIB"; then
+        AC_CHECK_LIB(db, dbopen, 
+            [ DB_LIB="db"; DB_CPPLIB="db_cxx" ])
+    fi
+
     if test -z "$DB_LIB" ; then 
-        AC_MSG_ERROR([db not installed or functional])
+        AC_MSG_ERROR([db library not found. Use the correct -L flag,
+or install the Berkeley db development package.])
     fi
+
     SCPDEFS="$SCPDEFS -DSYSTEM_DB"
 else
     AC_MSG_RESULT([internal])
@@ -4427,11 +4441,8 @@ else
     BUILD_TYPE="$BUILD_TYPE BERKELEYDB"
 fi
 AC_SUBST(SYSTEM_DB)
-AC_SUBST(DB_VERSION)
 AC_SUBST(DB_LIB)
 AC_SUBST(DB_CPPLIB)
-AC_SUBST(DB_INCLUDES)
-AC_SUBST(DB_JAR)
 
 dnl ===================================================================
 dnl Check for system lucene
@@ -8227,3 +8238,5 @@ else
    fi
    echo
 fi
+
+dnl vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/set_soenv.in b/set_soenv.in
index 826a11f..9f98864 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1922,10 +1922,8 @@ ToFile( "WITH_EXTRA_SAMPLE",       "@WITH_EXTRA_SAMPLE@",      "e" );
 ToFile( "WITH_EXTRA_FONT",       "@WITH_EXTRA_FONT@",      "e" );
 ToFile( "SYSTEM_TRANSLATE_TOOLKIT", "@SYSTEM_TRANSLATE_TOOLKIT@",        "e" );
 ToFile( "SYSTEM_DB",         "@SYSTEM_DB@",        "e" );
-ToFile( "DB_VERSION",        "@DB_VERSION@",       "e" );
 ToFile( "DB_LIB",            "@DB_LIB@",           "e" );
 ToFile( "DB_CPPLIB",         "@DB_CPPLIB@",        "e" );
-ToFile( "DB_INCLUDES",       "@DB_INCLUDES@",      "e" );
 ToFile( "ENABLE_MYSQLC",     "@ENABLE_MYSQLC@",    "e" );
 ToFile( "ENABLE_LOMENUBAR",  "@ENABLE_LOMENUBAR@", "e" );
 ToFile( "SYSTEM_MYSQL",      "@SYSTEM_MYSQL@",     "e" );


More information about the Libreoffice-commits mailing list