[Libreoffice] [PATCH] build system patches

Peter Foley pefoley2 at verizon.net
Tue Sep 6 15:32:38 PDT 2011


Hi,

Here are some patches for various problems I encountered while building 
libreoffice.

Thanks,

Peter
-------------- next part --------------
From 35e4d0715604a6337ddf36db5562af96bfdfc61c Mon Sep 17 00:00:00 2001
From: Peter Foley <pefoley2 at verizon.net>
Date: Mon, 5 Sep 2011 21:38:47 -0400
Subject: [PATCH 1/7 ] deliver libcrmf.a

Mozilla needs libcrmf.a to build.
This patch causes it to be delivered.

---
 nss/makefile.mk |    2 +-
 nss/prj/d.lst   |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/nss/makefile.mk b/nss/makefile.mk
index aa242bd..75ebb21 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -91,7 +91,7 @@ MACOS_SDK_DIR*=$(MACDEVSDK)
 .ENDIF # "$(EXTRA_CFLAGS)"!=""
 .ENDIF # "$(OS)"=="MACOSX"
 
-OUT2LIB=mozilla$/dist$/out$/lib$/*$(DLLPOST)
+OUT2LIB=mozilla$/dist$/out$/lib$/*$(DLLPOST) mozilla$/dist$/out$/lib$/libcrmf.a
 
 OUT2BIN=config$/nspr-config mozilla$/security$/nss$/nss-config
 
diff --git a/nss/prj/d.lst b/nss/prj/d.lst
index cc36eb1..a887c36 100644
--- a/nss/prj/d.lst
+++ b/nss/prj/d.lst
@@ -25,6 +25,7 @@ mkdir: %_DEST%\lib\sqlite
 ..\%__SRC%\lib\libsmime3.* %_DEST%\lib\libsmime3.*
 ..\%__SRC%\lib\libsoftokn3.* %_DEST%\lib\libsoftokn3.*
 ..\%__SRC%\lib\libssl3.* %_DEST%\lib\libssl3.*
+..\%__SRC%\lib\libcrmf.a %_DEST%\lib\libcrmf.a
 
 ..\%__SRC%\lib\libsqlite3.* %_DEST%\lib\sqlite\libsqlite3.*
 ..\%__SRC%\lib\*.lib %_DEST%\lib
-- 
1.7.6.1

-------------- next part --------------
From 913ba23fd2552436c7c48e83fd1d6ec7de6c2e96 Mon Sep 17 00:00:00 2001
From: Peter Foley <pefoley2 at verizon.net>
Date: Mon, 5 Sep 2011 21:39:22 -0400
Subject: [PATCH 2/7] /usr/local/lib

If /usr/local/lib doesn't exist the Mozilla build fails.
This patch fixes the build failure.

---
 moz/seamonkey-source-1.1.14.patch |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/moz/seamonkey-source-1.1.14.patch b/moz/seamonkey-source-1.1.14.patch
index db62e8b..07d8500 100644
--- a/moz/seamonkey-source-1.1.14.patch
+++ b/moz/seamonkey-source-1.1.14.patch
@@ -6352,3 +6352,14 @@
 +PROCESS_MAP_FILE = grep -v ';-' $< | \
 +        sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
 +
+--- misc/mozilla/directory/c-sdk/ldap/libraries/liblber/Makefile.in	2011-09-05 19:36:54.506893237 -0400
++++ misc/build/mozilla/directory/c-sdk/ldap/libraries/liblber/Makefile.in	2011-09-05 19:37:12.267893237 -0400
+@@ -82,7 +82,7 @@
+ export::    $(OBJDEST) $(LIBDIR) $(OBJS) $(LIBLBER)
+ 
+ $(LIBDIR):
+-	$(MKDIR) $(LIBDIR)
++	mkdir -p $(LIBDIR)
+ 
+ $(LIBLBER): $(OBJS) $(LIBDIR)
+ 	@echo ======= making $(LIBLBER)
-- 
1.7.6.1

-------------- next part --------------
From 2448a917e5c31b8ef11f8fe3f1e022a7188475e9 Mon Sep 17 00:00:00 2001
From: Peter Foley <pefoley2 at verizon.net>
Date: Tue, 6 Sep 2011 17:00:33 -0400
Subject: [PATCH 3/7] clean visibility.cxx

The visibility configure test failed to clean up visibility.cxx.
This patch fixes that.

---
 .gitignore   |    1 -
 configure.in |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 58f491f..8afcf96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,7 +53,6 @@
 /Makefile
 /makefile.mk
 /set_soenv
-/visibility.cxx
 /post_download
 /bin/repo-list
 /src.downloaded
diff --git a/configure.in b/configure.in
index f2c3cba..638a9bb 100755
--- a/configure.in
+++ b/configure.in
@@ -3572,7 +3572,7 @@ _ACEOF
                 ;;
             esac
         fi
-        rm -f visibility.s
+        rm -f visibility.s visibility.cxx
 
         AC_MSG_RESULT([$gccvisbroken])
         if test "$gccvisbroken" = "yes"; then
-- 
1.7.6.1

-------------- next part --------------
From 2e1358b677ed79005502f3b567c993b380b59ecf Mon Sep 17 00:00:00 2001
From: Peter Foley <pefoley2 at verizon.net>
Date: Tue, 6 Sep 2011 17:31:22 -0400
Subject: [PATCH 4/7] ooo.lst

This patch moves the generation of ooo.lst to prevent generating config.status
twice. This uncovered a implicit dependency on the config.status code which 
necesitated the addition of $prefix setting code to prevent $PREFIXDIR from 
being "NONE".

---
 configure.in |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.in b/configure.in
index 638a9bb..57bb3d9 100755
--- a/configure.in
+++ b/configure.in
@@ -5579,8 +5579,6 @@ fi
 AC_SUBST(WITH_LDAP)
 AC_SUBST(WITH_OPENLDAP)
 
-AC_OUTPUT([ooo.lst])
-
 dnl ===================================================================
 dnl Check for system mozilla
 dnl ===================================================================
@@ -5784,7 +5782,7 @@ if test "$BUILD_MOZAB" = "TRUE"; then
         MOZILLA_VERSION=1.1.14
     fi
     MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source"
-    MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst`
+    MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst.in`
     AC_MSG_CHECKING([for Mozilla sources])
     if test -z "$MOZILLA_FETCH_FILE"; then
         AC_MSG_RESULT([not found])
@@ -9109,6 +9107,8 @@ AC_MSG_RESULT([$PRODUCTNAME])
 AC_SUBST(PRODUCTNAME)
 
 AC_MSG_CHECKING([for prefix])
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 PREFIXDIR="$prefix"
 AC_MSG_RESULT([$PREFIXDIR])
 AC_SUBST(PREFIXDIR)
@@ -9330,7 +9330,7 @@ else
     echo > set_soenv.last
 fi
 
-AC_OUTPUT([set_soenv Makefile bin/repo-list])
+AC_OUTPUT([ooo.lst set_soenv Makefile bin/repo-list])
 
 # touch the config timestamp file set_soenv.stamp
 if test ! -f set_soenv.stamp; then
-- 
1.7.6.1

-------------- next part --------------
From 06b2b4feb60c4758ee57528f8f144b09af6cb1a0 Mon Sep 17 00:00:00 2001
From: Peter Foley <pefoley2 at verizon.net>
Date: Tue, 6 Sep 2011 17:32:15 -0400
Subject: [PATCH 5/7] silence the hamcrest check

---
 configure.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.in b/configure.in
index 57bb3d9..3daea99 100755
--- a/configure.in
+++ b/configure.in
@@ -8859,7 +8859,7 @@ if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
     if test $? -eq 0; then
         # check if either class-path entry is available for hamcrest or
         # it's bundled
-        if "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" |grep hamcrest || \
+        if "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" |grep -q hamcrest || \
             "$UNZIP" -c "$OOO_JUNIT_JAR" META-INF/MANIFEST.MF |grep -q 'Class-Path: hamcrest'; then
             AC_MSG_RESULT([$OOO_JUNIT_JAR])
         else
-- 
1.7.6.1

-------------- next part --------------
From 7860f77f2d253319a68e6b501b6198d456d88987 Mon Sep 17 00:00:00 2001
From: Peter Foley <pefoley2 at verizon.net>
Date: Tue, 6 Sep 2011 17:58:25 -0400
Subject: [PATCH 6/7] autoupdate part 1

Implement some sugestions from autoupdate.
I increased the required autoconf version to 2.58 since the current configure
script does not work with any lower version.

---
 configure.in |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/configure.in b/configure.in
index 3daea99..57dad9a 100755
--- a/configure.in
+++ b/configure.in
@@ -2,8 +2,8 @@ dnl -*- Mode: Autoconf; tab-width: 8; 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/])
-AC_PREREQ(2.50)
+AC_INIT([LibreOffice],[3.5],[],[],[http://documentfoundation.org/])
+AC_PREREQ([2.58])
 echo "$@" >config.parms
 
 dnl ===================================================================
@@ -1466,7 +1466,7 @@ echo ""
 dnl ===================================================================
 dnl checks build and host OSes
 dnl ===================================================================
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_HOST
 
 if test "$cross_compiling" = "yes"; then
     CROSS_COMPILING=YES
@@ -9330,7 +9330,8 @@ else
     echo > set_soenv.last
 fi
 
-AC_OUTPUT([ooo.lst set_soenv Makefile bin/repo-list])
+AC_CONFIG_FILES([ooo.lst set_soenv Makefile bin/repo-list])
+AC_OUTPUT
 
 # touch the config timestamp file set_soenv.stamp
 if test ! -f set_soenv.stamp; then
-- 
1.7.6.1

-------------- next part --------------
From 7c91d6f411519e4910ab11466382e13f90b07a37 Mon Sep 17 00:00:00 2001
From: Peter Foley <pefoley2 at verizon.net>
Date: Tue, 6 Sep 2011 18:04:14 -0400
Subject: [PATCH 7/7] autoupdate part 2

Implement some more suggestions from autoupdate.

---
 configure.in |  101 +++++++++++++++++++++++----------------------------------
 1 files changed, 41 insertions(+), 60 deletions(-)
 mode change 100755 => 100644 configure.in

diff --git a/configure.in b/configure.in
old mode 100755
new mode 100644
index 57dad9a..4a4e9e6
--- a/configure.in
+++ b/configure.in
@@ -3035,7 +3035,7 @@ if test "$GXX" = "yes"; then
 
     if test "$_gpp_majmin" = "304"; then
         AC_MSG_CHECKING([whether $CXX has the enum bug])
-        AC_TRY_RUN([
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
             extern "C" void abort (void);
             extern "C" void exit (int status);
 
@@ -3054,8 +3054,7 @@ if test "$GXX" = "yes"; then
                 test (E0);
                 return 0;
             }
-            ],
-            [AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents LibreOffice from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])], [AC_MSG_RESULT([no])])
+            ]])],[AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents LibreOffice from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])],[AC_MSG_RESULT([no])],[])
     fi
 fi
 
@@ -3274,12 +3273,10 @@ _ACEOF
     AC_LANG_PUSH([C++])
 
     AC_MSG_CHECKING([for dynamic libgcc])
-    AC_TRY_LINK([
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <iostream>
 using namespace std;
-],  
-        [ try { throw 42; } catch (int e) { cout << "Yep, " << e << endl; } ],
-        [   
+]], [[ try { throw 42; } catch (int e) { cout << "Yep, " << e << endl; } ]])],[   
             MINGW_GCCDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libgcc' | $SED -e 's at .*DLL Name: @@'`
             if test -n "$MINGW_GCCDLL"; then
                 MINGW_SHARED_GCCLIB=YES
@@ -3288,18 +3285,15 @@ using namespace std;
                 MINGW_SHARED_GCCLIB=NO
                 AC_MSG_RESULT([no])
             fi
-       ],
-       [ AC_MSG_RESULT([no])
-       ]
-    )
+       ],[ AC_MSG_RESULT([no])
+       
+    ])
 
     AC_MSG_CHECKING([for dynamic libstdc++])
-    AC_TRY_LINK([
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <iostream>
 using namespace std;
-],  
-        [ cout << "Hello there." << endl; ],
-        [   
+]], [[ cout << "Hello there." << endl; ]])],[   
             MINGW_GXXDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libstdc++' | $SED -e 's at .*DLL Name: @@'`
             if test -n "$MINGW_GXXDLL"; then
                 mingw_gxxdll_root=${MINGW_GXXDLL%.dll}
@@ -3311,10 +3305,9 @@ using namespace std;
                 MINGW_SHARED_GXXLIB=NO
                 AC_MSG_RESULT([no])
             fi
-       ],
-       [ AC_MSG_RESULT([no])
-       ]
-    )
+       ],[ AC_MSG_RESULT([no])
+       
+    ])
 
     AC_LANG_POP([C++])
 
@@ -3348,16 +3341,12 @@ dnl *************************************************************
 if test "$WITH_MINGW" = "yes"; then
     AC_MSG_CHECKING([exception type])
     AC_LANG_PUSH([C++])
-    AC_TRY_LINK(
-        [#include <iostream>
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iostream>
 
         extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
 
-        ],
-        [_Unwind_SjLj_RaiseException() ],
-        [exceptions_type="sjlj"],
-        [exceptions_type="dwarf2"]
-    )
+        ]], [[_Unwind_SjLj_RaiseException() ]])],[exceptions_type="sjlj"],[exceptions_type="dwarf2"
+    ])
     AC_MSG_RESULT($exceptions_type)
     AC_LANG_POP([C++])
 fi
@@ -3422,7 +3411,7 @@ if test "$GCC" = "yes"; then
     AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
     save_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
-    AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], [])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_VISIBILITY_FEATURE=TRUE ],[])
     CFLAGS=$save_CFLAGS
     if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
         AC_MSG_RESULT([yes])
@@ -3433,7 +3422,7 @@ if test "$GCC" = "yes"; then
     AC_MSG_CHECKING([whether $CC supports -Wno-long-double])
     save_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -Werror -Wno-long-double"
-    AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_NO_LONG_DOUBLE=TRUE ], [])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_NO_LONG_DOUBLE=TRUE ],[])
     CFLAGS=$save_CFLAGS
     if test "$HAVE_GCC_NO_LONG_DOUBLE" = "TRUE"; then
         AC_MSG_RESULT([yes])
@@ -3444,7 +3433,7 @@ if test "$GCC" = "yes"; then
     AC_MSG_CHECKING([whether $CC supports -mno-avx])
     save_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -Werror -mno-avx"
-    AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_AVX=TRUE ], [])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_AVX=TRUE ],[])
     CFLAGS=$save_CFLAGS
     if test "$HAVE_GCC_AVX" = "TRUE"; then
         AC_MSG_RESULT([yes])
@@ -3457,7 +3446,7 @@ if test "$GCC" = "yes"; then
     CXXFLAGS="$CXXFLAGS -std=c++0x"
     AC_LANG_PUSH([C++])
 
-    AC_TRY_COMPILE([
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stddef.h>
 
 template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
@@ -3470,7 +3459,7 @@ namespace
                 int j;
         };
 }
-],[
+]], [[
 struct a
 {
         int i;
@@ -3481,7 +3470,7 @@ b thingb[]={{0,0}, {1,1}};
 size_t i = sizeof(sal_n_array_size(thinga));
 size_t j = sizeof(sal_n_array_size(thingb));
 return !(i != 0 && j != 0);
-], HAVE_CXX0X=TRUE,)
+]])],[HAVE_CXX0X=TRUE],[])
 
     AC_LANG_POP([C++])
     CXXFLAGS=$save_CXXFLAGS
@@ -3520,17 +3509,14 @@ if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) ; then
         LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
 
         AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
-        AC_TRY_LINK(
-            [
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <sstream>
 using namespace std;
-            ],[
+            ]], [[
 istringstream strm( "test" ); return 0;
-            ],
-            $EGREP -q  unresolvable conftest.err;
-            if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi,
-            gccvisok=no
-        )
+            ]])],[$EGREP -q  unresolvable conftest.err;
+            if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi],[gccvisok=no
+        ])
         AC_MSG_RESULT([$gccvisok])
         if test "$gccvisok" = "no"; then
             AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.])
@@ -4923,10 +4909,7 @@ if test -n "$with_system_db" -o -n "$with_system_libs" && \
     fi
 
     AC_MSG_CHECKING([whether db is at least 4.1])
-    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])])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#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])])
 
     SYSTEM_DB_CFLAGS="-DSYSTEM_DB_HEADER='<$db_header>'"
 
@@ -5105,7 +5088,7 @@ if test "$ENABLE_MYSQLC" = "YES"; then
         AC_CHECK_LIB(mysqlcppconn, main, [],
                     [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], [])
         AC_MSG_CHECKING([version])
-        AC_TRY_RUN([
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <mysql_driver.h>
 
 int main(int argc, char **argv) {
@@ -5118,7 +5101,7 @@ int main(int argc, char **argv) {
       else
         return 1;
 }
-      ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, we need >= 1.0.6])])
+      ]])],[AC_MSG_RESULT(OK)],[AC_MSG_ERROR([not suitable, we need >= 1.0.6])],[])
 
         AC_LANG_POP([C++])
 
@@ -5391,8 +5374,8 @@ if test -n "$with_system_boost" -o -n "$with_system_headers" && \
     save_CXXFLAGS=$CXXFLAGS
     CXXFLAGS="$CXXFLAGS -fno-exceptions"
     AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
-    AC_TRY_COMPILE([#include <boost/function.hpp>
-], [], ac_cv_cxx_boost_no_exceptions_broken=no, ac_cv_cxx_boost_no_exceptions_broken=yes)
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/function.hpp>
+]], [[]])],[ac_cv_cxx_boost_no_exceptions_broken=no],[ac_cv_cxx_boost_no_exceptions_broken=yes])
 
     if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then
         AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
@@ -5442,7 +5425,7 @@ if test -n "$with_system_mdds" -o -n "$with_system_headers" && \
     save_CXXFLAGS="$CXXFLAGS"
     CXXFLAGS="$CXXFLAGS $MDDS_CPPFLAGS"
     AC_MSG_CHECKING([for correct signature of ::mdds::flat_segment_tree])
-    AC_TRY_RUN([#include <mdds/flat_segment_tree.hpp>
+    AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <mdds/flat_segment_tree.hpp>
 
     int main(int argc, char **argv) {
         ::mdds::flat_segment_tree<long, short> db(0, 100, 0);
@@ -5451,7 +5434,7 @@ if test -n "$with_system_mdds" -o -n "$with_system_headers" && \
             return 1;
         return 0;
     }
-], ac_cv_cxx_mdds_flat_segment_tree_correct=yes, ac_cv_cxx_mdds_flat_segment_tree_correct=no)
+]])],[ac_cv_cxx_mdds_flat_segment_tree_correct=yes],[ac_cv_cxx_mdds_flat_segment_tree_correct=no],[])
 
     if test "$ac_cv_cxx_mdds_flat_segment_tree_correct" = "yes"; then
         AC_MSG_RESULT([yes])
@@ -5892,7 +5875,7 @@ if test -n "$with_system_icu" -o -n "$with_system_libs" && \
     SYSTEM_ICU=YES
     AC_LANG_PUSH([C++])
     AC_MSG_CHECKING([for unicode/rbbi.h])
-    AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.]))
+    AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)])
     AC_LANG_POP([C++])
     AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
     if test -z "$SYSTEM_GENBRK"; then
@@ -7621,14 +7604,14 @@ the root of your Qt installation by exporting QT4DIR before running "configure".
     save_CXXFLAGS=$CXXFLAGS
     CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS"
     AC_MSG_CHECKING([whether KDE is >= 4.2])
-       AC_TRY_RUN([
+       AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <kdeversion.h>
 
 int main(int argc, char **argv) {
        if (KDE_VERSION_MAJOR == 4 && KDE_VERSION_MINOR >= 2) return 0;
        else return 1;
 }
-       ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([KDE version too old])])
+       ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
     CXXFLAGS=$save_CXXFLAGS
     AC_LANG_POP([C++])
 
@@ -7683,14 +7666,14 @@ if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then
     save_CXXFLAGS=$CXXFLAGS
     CXXFLAGS="$CXXFLAGS $KDE_CFLAGS"
     AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6])
-       AC_TRY_RUN([
+       AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <kdeversion.h>
 
 int main(int argc, char **argv) {
        if (KDE_VERSION_MAJOR == 3 && 2 <= KDE_VERSION_MINOR && KDE_VERSION_MINOR <= 6) return 0;
        else return 1;
 }
-       ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([KDE version too old or too recent, please use another version of KDE or disable KDE address book support])])
+       ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old or too recent, please use another version of KDE or disable KDE address book support])],[])
     CXXFLAGS=$save_CXXFLAGS
     AC_LANG_POP([C++])
     ENABLE_KAB=TRUE
@@ -8382,7 +8365,7 @@ if test "$with_system_cairo" = yes -o \( "$with_system_libs" = yes -a "$with_sys
 
     if test "$with_system_xrender_headers" = "yes"; then
          AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
-         AC_TRY_RUN([
+         AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <X11/extensions/Xrender.h>
 
 int main(int argc, char **argv) {
@@ -8392,10 +8375,8 @@ int main(int argc, char **argv) {
       return 1;
 #endif
 }
-        ],
-        [AC_MSG_RESULT([yes])],
-        [AC_MSG_ERROR([no, X headers too old.])]
-        )
+        ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])
+        ],[])
     fi
 else
     AC_MSG_RESULT([no])
-- 
1.7.6.1



More information about the LibreOffice mailing list