[Libreoffice-commits] .: 2 commits - configure.in sal/qa

Tomáš Chvátal tchvatal at kemper.freedesktop.org
Wed Oct 5 04:14:30 PDT 2011


 configure.in                     |  116 ++++++++++++++++-----------------------
 sal/qa/osl/module/osl_Module.cxx |   45 ---------------
 2 files changed, 50 insertions(+), 111 deletions(-)

New commits:
commit 0ca1973c7c97e62c727484ea66adef26fa2f8162
Author: Tomas Chvatal <tchvatal at suse.cz>
Date:   Wed Oct 5 13:11:49 2011 +0200

    Drop test that require tmp with exec rights.

diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx
index c8fed7d..0a0a37e 100644
--- a/sal/qa/osl/module/osl_Module.cxx
+++ b/sal/qa/osl/module/osl_Module.cxx
@@ -291,54 +291,9 @@ namespace osl_Module
             CPPUNIT_ASSERT_MESSAGE( "#test comment#: load function should do the same thing as constructor with library name.",
                                     sal_True == bRes  );
         }
-        // load lib which is under a CJK directory
-        void load_002( )
-        {
-#if defined( UNX ) && !defined( MACOSX ) && !defined( FREEBSD )
-            // TODO: Find out why this fails on Mac OS X
-            //Can not get a CJK directory already exist, so here create one. Perhaps reason is encoding problem.
-            ::rtl::OUString aPidDirURL = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///tmp/")) + ::rtl::OUString::valueOf( ( long )getpid( ) );
-            ::rtl::OUString aMyDirURL = aPidDirURL + aKname;
-            createTestDirectory( aPidDirURL );
-            createTestDirectory( aMyDirURL );
-
-            ::rtl::OUString aDLLURL = aMyDirURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/libModule_DLL.so"));
-            //check if the lib exist.
-            //FIXME: if assert condition is false, the case will return, so the directory will not be clean-up
-            CPPUNIT_ASSERT_MESSAGE( "#Source file is not exist. please manually clean-up directory and file under /tmp", ifFileExist( getDllURL( ) ) == sal_True );
-            ::osl::FileBase::RC nError = ::osl::File::copy( getDllURL( ), aDLLURL );
-            CPPUNIT_ASSERT_MESSAGE( "#copy failed. please manually clean-up directory and file under /tmp", nError == ::osl::FileBase::E_None );
-            //ifFileExist returned false but the file exist
-            CPPUNIT_ASSERT_MESSAGE( "#This file is not exist, copy failed. please manually clean-up directory and file under /tmp", ifFileExist( aDLLURL ) == sal_True );
-
-            //test if can create a normal file
-            ::rtl::OUString aFileURL = aMyDirURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/test_file"));
-            ::osl::File testFile( aFileURL );
-            nError = testFile.open( osl_File_OpenFlag_Create );
-            CPPUNIT_ASSERT_MESSAGE( "#create failed. please manually clean-up directory and file under /tmp", nError == ::osl::FileBase::E_None );
-            CPPUNIT_ASSERT_MESSAGE( "#This file is not exist, create failed. please manually clean-up directory and file under /tmp", ifFileExist( aFileURL ) == sal_True );
-
-            //load the copied dll
-            ::osl::Module aMod( aDLLURL );
-            ::osl::Module aMod1;
-
-            sal_Bool bOK = aMod1.load( aDLLURL );
-            bRes = oslModule(aMod) == oslModule(aMod1);
-            aMod.unload( );
-            aMod1.unload( );
-            deleteTestFile( aFileURL );
-            deleteTestFile( aDLLURL );
-            deleteTestDirectory( aMyDirURL );
-            deleteTestDirectory( aPidDirURL );
-
-            CPPUNIT_ASSERT_MESSAGE( "#test comment#: load lib which is under a CJK directory.",
-                                    sal_True == bRes && bOK == sal_True );
-#endif
-        }
 
         SAL_CPPUNIT_TEST_SUITE( load );
         CPPUNIT_TEST( load_001 );
-        CPPUNIT_TEST( load_002 );
         SAL_CPPUNIT_TEST_SUITE_END( );
     }; // class load
 
commit e9cc0d9cabb6df2ec956be026970042cc3dbd70a
Author: Tomas Chvatal <tchvatal at suse.cz>
Date:   Tue Oct 4 11:02:22 2011 +0200

    Use simpler detection for system/internal libs.

diff --git a/configure.in b/configure.in
index 9ba7653..21a1a5e 100644
--- a/configure.in
+++ b/configure.in
@@ -685,8 +685,8 @@ AC_ARG_WITH(external-thes-dir,
 
 AC_ARG_WITH(system-libs,
     AS_HELP_STRING([--with-system-libs],
-        [Use libraries already on system -- enables all --with-system-* flags except
-         mozilla, libvisio, libexttextcat and translate-toolkit.]),
+        [Use C/C++ libraries already on system -- enables all --with-system-*.
+         Except mozilla libs.]),
 ,)
 
 AC_ARG_WITH(system-headers,
@@ -698,9 +698,7 @@ AC_ARG_WITH(system-headers,
 
 AC_ARG_WITH(system-jars,
     AS_HELP_STRING([--without-system-jars],
-        [When building with --with-system-libs, also the needed jars are expected
-         on the system. Use this to disable that (except for the db case where
-         --with-system-db *has to* imply using the db.jar from there, too).]),
+        [Use Java packages already on system]),
 ,)
 
 AC_ARG_WITH(system-zlib,
@@ -2280,7 +2278,7 @@ fi
 dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
 dnl ===================================================================
 AC_MSG_CHECKING([whether to turn warnings to errors])
-if test -n "$enable_werror" && test "$enable_werror" != "no"; then
+if test "x$enable_werror" = "xyes"; then
     ENABLE_WERROR="TRUE"
     AC_MSG_RESULT([yes])
 else
@@ -2292,7 +2290,7 @@ AC_SUBST(ENABLE_WERROR)
 dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols)
 dnl ===================================================================
 AC_MSG_CHECKING([whether to do a debug build])
-if test -n "$enable_debug" && test "$enable_debug" != "no"; then
+if test "x$enable_debug" != "xyes"; then
     ENABLE_DEBUG="TRUE"
     enable_symbols="yes"
     AC_MSG_RESULT([yes])
@@ -2305,7 +2303,7 @@ AC_SUBST(ENABLE_DEBUG)
 dnl Set the ENABLE_DBGUTIL variable
 dnl ===================================================================
 AC_MSG_CHECKING([whether to build with additional debug utilities])
-if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then
+if test "x$enable_dbgutil" = "xyes"; then
     PROEXT=""
     PRODUCT=""
     AC_MSG_RESULT([yes])
@@ -2331,7 +2329,7 @@ AC_SUBST(PROEXT)
 # Set the ENABLE_LTO variable
 # ===================================================================
 AC_MSG_CHECKING([whether to use link-time optimization])
-if test -n "$enable_lto" -a "$enable_lto" != "no"; then
+if test "x$enable_lto" = "xyes"; then
     ENABLE_LTO="TRUE"
     AC_MSG_RESULT([yes])
 else
@@ -2343,7 +2341,7 @@ AC_SUBST(ENABLE_LTO)
 dnl whether to include symbols into final build.
 dnl ===================================================================
 AC_MSG_CHECKING([whether to include symbols])
-if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
+if test "x$enable_symbols" != "xyes"; then
     ENABLE_SYMBOLS="TRUE"
     AC_MSG_RESULT([yes])
 else
@@ -2355,10 +2353,7 @@ AC_SUBST(ENABLE_SYMBOLS)
 dnl Determine if the solver is to be stripped or not.
 dnl ===================================================================
 AC_MSG_CHECKING([whether to strip the solver or not.])
-if test "z$enable_strip_solver" = "zno"; then
-    DISABLE_STRIP="TRUE"
-    AC_MSG_RESULT([no])
-else
+if test "x$enable_strip_solver" != "xno"; then
     if test -n "$ENABLE_SYMBOLS"; then
         DISABLE_STRIP="TRUE"
         AC_MSG_RESULT([no])
@@ -2366,6 +2361,9 @@ else
         DISABLE_STRIP=
         AC_MSG_RESULT([yes])
     fi
+else
+    DISABLE_STRIP="TRUE"
+    AC_MSG_RESULT([no])
 fi
 AC_SUBST(DISABLE_STRIP)
 
@@ -2511,7 +2509,7 @@ dnl ===================================================================
 dnl Set the ENABLE_PCH variable. (Activate --enable-pch)
 dnl ===================================================================
 AC_MSG_CHECKING([whether to enable pch feature])
-if test -n "$enable_pch" && test "$enable_pch" != "no"; then
+if test "$enable_pch" = "yes"; then
     if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
         ENABLE_PCH="TRUE"
         AC_MSG_RESULT([yes])
@@ -4536,8 +4534,8 @@ dnl ===================================================================
 dnl Check for system stdlibs
 dnl ===================================================================
 AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset])
-if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \
-    test "$with_system_stdlibs" != "no"; then
+if test "$with_system_stdlibs" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_stdlibs" != "xno"; then
     AC_MSG_RESULT([no])
     SYSTEM_STDLIBS=YES
 else
@@ -4550,9 +4548,8 @@ dnl ===================================================================
 dnl Check for system zlib
 dnl ===================================================================
 AC_MSG_CHECKING([which zlib to use])
-if test -n "$with_system_zlib" -o -n "$with_system_libs" -o \
-        "$_os" != "WINNT" && \
-    test "$with_system_zlib" != "no"; then
+if test "$with_system_zlib" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_zlib" != "xno"; then
     AC_MSG_RESULT([external])
     SYSTEM_ZLIB=YES
     AC_CHECK_HEADER(zlib.h, [],
@@ -4570,9 +4567,8 @@ dnl ===================================================================
 dnl Check for system jpeg
 dnl ===================================================================
 AC_MSG_CHECKING([which jpeg to use])
-if test -n "$with_system_jpeg" -o -n "$with_system_libs" -o \
-        "$_os" = "Linux" && \
-    test "$with_system_jpeg" != "no"; then
+if test "$with_system_jpeg" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_jpeg" != "xno"; then
     AC_MSG_RESULT([external])
     SYSTEM_JPEG=YES
     AC_CHECK_HEADER(jpeglib.h, [],
@@ -4590,8 +4586,8 @@ dnl ===================================================================
 dnl Check for system expat
 dnl ===================================================================
 AC_MSG_CHECKING([which expat to use])
-if test -n "$with_system_expat" -o -n "$with_system_libs" && \
-    test "$with_system_expat" != "no"; then
+if test "$with_system_expat" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_expat" != "xno"; then
     AC_MSG_RESULT([external])
     SYSTEM_EXPAT=YES
     AC_CHECK_HEADER(expat.h, [],
@@ -4610,7 +4606,8 @@ dnl ===================================================================
 dnl Check for system libvisio
 dnl ===================================================================
 AC_MSG_CHECKING([which libvisio to use])
-if test -n "$with_system_libvisio" -a "$with_system_libvisio" = "yes"; then
+if test "$with_system_libvisio" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_libvisio" != "xno"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBVISIO=YES
     PKG_CHECK_MODULES( VISIO, libvisio-0.0 )
@@ -4628,8 +4625,8 @@ dnl Check for system libcmis
 dnl ===================================================================
 if test "x$with_cmis" != "xno" ; then
     AC_MSG_CHECKING([which libcmis to use])
-    if test -n "$with_system_libcmis" -o -n "$with_system_libs" && \
-            test "$with_system_libcmis" != "no"; then
+    if test "x$with_system_libcmis" = "xyes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_libcmis" != "xno"; then
         AC_MSG_RESULT([external])
         SYSTEM_LIBCMIS=YES
         PKG_CHECK_MODULES( LIBCMIS, libcmis-0.2 )
@@ -4648,8 +4645,8 @@ dnl ===================================================================
 dnl Check for system libwpd
 dnl ===================================================================
 AC_MSG_CHECKING([which libwpd to use])
-if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \
-        test "$with_system_libwpd" != "no"; then
+if test "$with_system_libwpd" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_libwpd" != "xno"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBWPD=YES
     PKG_CHECK_MODULES( WPD, libwpd-0.9 libwpd-stream-0.9 )
@@ -4666,8 +4663,8 @@ dnl ===================================================================
 dnl Check for system cppunit
 dnl ===================================================================
 AC_MSG_CHECKING([which cppunit to use])
-if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \
-        test "$with_system_cppunit" != "no"; then
+if test "$with_system_cppunit" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_cppunit" != "xno"; then
     AC_MSG_RESULT([external])
     SYSTEM_CPPUNIT=YES
     # might work for earlier, too but go sure:
@@ -4684,7 +4681,7 @@ AC_SUBST(CPPUNIT_LIBS)
 dnl ===================================================================
 dnl Check whether freetype is available
 dnl ===================================================================
-if test  "$test_freetype" = "yes"; then
+if test "x$test_freetype" = "xyes"; then
     AC_MSG_CHECKING([whether freetype is available])
     PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 )
 fi
@@ -4695,8 +4692,8 @@ dnl ===================================================================
 dnl Check for system libwps
 dnl ===================================================================
 AC_MSG_CHECKING([which libwps to use])
-if test -n "$with_system_libwps" -o -n "$with_system_libs" && \
-        test "$with_system_libwps" != "no"; then
+if test "$with_system_libwps" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_libwps" != "xno"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBWPS=YES
     PKG_CHECK_MODULES( WPS, libwps-0.2 )
@@ -4713,8 +4710,8 @@ dnl ===================================================================
 dnl Check for system libwpg
 dnl ===================================================================
 AC_MSG_CHECKING([which libwpg to use])
-if test -n "$with_system_libwpg" -o -n "$with_system_libs" && \
-        test "$with_system_libwpg" != "no"; then
+if test "$with_system_libwpg" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_libwpg" != "xno"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBWPG=YES
     PKG_CHECK_MODULES( WPG, libwpg-0.2 )
@@ -4730,7 +4727,7 @@ AC_SUBST(WPG_LIBS)
 dnl ===================================================================
 dnl Check whether freetype2 supports emboldening
 dnl ===================================================================
-if test  "$test_freetype" = "yes"; then
+if test "$test_freetype" = "yes"; then
     save_CPPFLAGS="$CPPFLAGS"
     save_LDFLAGS="$LDFLAGS"
     save_LIBS="$LIBS"
@@ -4744,34 +4741,21 @@ if test  "$test_freetype" = "yes"; then
 fi
 AC_SUBST(USE_FT_EMBOLDEN)
 
-if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
-       test "$with_system_libxslt" != "no"; then
-    if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
-           test "$with_system_libxml" = "no"; then
-        # somehow AC_MSG_WARN won't work...
-        echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
-        echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
-        with_system_libxml=yes
-    fi
-fi
-if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
-       test "$with_system_libxml" != "no"; then
-    if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
-           test "$with_system_libxslt" = "no"; then
-        # somehow AC_MSG_WARN won't work...
-        echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
-        echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
-        with_system_libxslt=yes
-    fi
+if test "x$with_system_libxslt" != "x$with_system_libxml"; then
+    with_system_libxml=yes
+    with_system_libxslt=yes
+    echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml"
+    echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn
+    echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt"
+    echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn
 fi
 
 # ===================================================================
 # Check for system libxslt
 # ===================================================================
 AC_MSG_CHECKING([which libxslt to use])
-if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \
-       "$_os" = "Darwin" && \
-       test "$with_system_libxslt" != "no"; then
+if test "$with_system_libxslt" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_libxslt" != "xno"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBXSLT=YES
     if test "$_os" = "Darwin"; then
@@ -4811,9 +4795,8 @@ AC_SUBST(XSLTPROC)
 # Check for system libxml
 # ===================================================================
 AC_MSG_CHECKING([which libxml to use])
-if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \
-            "$_os" = "Darwin" -o $_os = iOS && \
-        test "$with_system_libxml" != "no"; then
+if test "$with_system_libxml" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_libxml" != "xno"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBXML=YES
     if test "$_os" = "Darwin"; then
@@ -5048,8 +5031,8 @@ dnl ===================================================================
 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
+if test "$with_system_db" = "yes" -o "x$with_system_libs" = "xyes" && \
+        test "x$with_system_db" != "xno"; then
     SYSTEM_DB=YES
     AC_MSG_RESULT([external])
 
@@ -6494,7 +6477,8 @@ dnl ===================================================================
 dnl Checking for libexttextcat
 dnl ===================================================================
 AC_MSG_CHECKING([which libexttextcat to use])
-if test "x$with_system_libexttextcat" = "xyes"; then
+if test "x$with_system_libexttextcat" = "xyes" -o -n "$with_system_libs" && \
+        test "x$with_system_libexttextcat" != "xno"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBEXTTEXTCAT=YES
     PKG_CHECK_MODULES([LIBEXTTEXTCAT], [libexttextcat])


More information about the Libreoffice-commits mailing list