diff options
author | Oliver Bolte <obo@openoffice.org> | 2008-10-10 13:02:43 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2008-10-10 13:02:43 +0000 |
commit | 5208ea7053255a8d4dae5dd9670dffa0eae1610e (patch) | |
tree | beef9a231bed507647c446144bc1b8d95bbac650 | |
parent | 9e92adaecbf8451740dd67fb8636f91dee2d3140 (diff) |
CWS-TOOLING: integrate CWS cmcfixes49
-rwxr-xr-x | config_office/configure | 217 | ||||
-rw-r--r-- | config_office/configure.in | 44 | ||||
-rw-r--r-- | config_office/set_soenv.in | 7 | ||||
-rw-r--r-- | soltools/giparser/gi_parse.cxx | 6 | ||||
-rw-r--r-- | soltools/support/simstr.cxx | 10 |
5 files changed, 170 insertions, 114 deletions
diff --git a/config_office/configure b/config_office/configure index 14ada8975246..bacbd5218cf2 100755 --- a/config_office/configure +++ b/config_office/configure @@ -733,7 +733,6 @@ PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH -EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL @@ -924,7 +923,10 @@ SYSTEM_CAIRO ENABLE_OPENGL ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN +POPPLER_CFLAGS +POPPLER_LIBS ENABLE_PDFIMPORT +SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR @@ -1867,6 +1869,8 @@ Optional Packages: --with-system-icu Use icu already on system + --with-system-poppler Use poppler already on system + --with-system-db Use berkeley db already on system --with-system-lucene Use lucene already on system @@ -3030,6 +3034,12 @@ if test "${with_system_icu+set}" = set; then fi +# Check whether --with-system-poppler was given. +if test "${with_system_poppler+set}" = set; then + withval=$with_system_poppler; +fi + + # Check whether --with-system-db was given. if test "${with_system_db+set}" = set; then withval=$with_system_db; @@ -10209,80 +10219,6 @@ echo "${ECHO_T}checked" >&6; } fi fi -{ echo "$as_me:$LINENO: checking exception type" >&5 -echo $ECHO_N "checking exception type... $ECHO_C" >&6; } -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -if test "${exceptions_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <iostream> - -extern "C" void __sjthrow(void) __attribute__ ((__noreturn__)); - - -int -main () -{ -__sjthrow() - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - exceptions_type="sjlj" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - exceptions_type="dwarf2" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - -fi - - -{ echo "$as_me:$LINENO: result: $exceptions_type" >&5 -echo "${ECHO_T}$exceptions_type" >&6; } -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -EXCEPTIONS="$exceptions_type" - - if test "$_os" = "SunOS"; then _temp=`showrev -p | $AWK -F" " '{ print $2 }'` if test "$_os_release" = "7"; then @@ -10643,7 +10579,8 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF + +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -25047,8 +24984,121 @@ echo $ECHO_N "checking whether to build the PDF Import extension... $ECHO_C" >&6 if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - BUILD_TYPE="$BUILD_TYPE XPDF" ENABLE_PDFIMPORT=YES + + { echo "$as_me:$LINENO: checking which pdf backend to use" >&5 +echo $ECHO_N "checking which pdf backend to use... $ECHO_C" >&6; } + if test -n "$with_system_poppler" -o -n "$with_system_libs" && \ + test "$with_system_poppler" != "no"; then + { echo "$as_me:$LINENO: result: external" >&5 +echo "${ECHO_T}external" >&6; } + SYSTEM_POPPLER=YES + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { echo "$as_me:$LINENO: checking for poppler >= 0.8.0 " >&5 +echo $ECHO_N "checking for poppler >= 0.8.0 ... $ECHO_C" >&6; } + + if $PKG_CONFIG --exists "poppler >= 0.8.0 " ; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + succeeded=yes + + { echo "$as_me:$LINENO: checking POPPLER_CFLAGS" >&5 +echo $ECHO_N "checking POPPLER_CFLAGS... $ECHO_C" >&6; } + POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler >= 0.8.0 "` + { echo "$as_me:$LINENO: result: $POPPLER_CFLAGS" >&5 +echo "${ECHO_T}$POPPLER_CFLAGS" >&6; } + + { echo "$as_me:$LINENO: checking POPPLER_LIBS" >&5 +echo $ECHO_N "checking POPPLER_LIBS... $ECHO_C" >&6; } + POPPLER_LIBS=`$PKG_CONFIG --libs "poppler >= 0.8.0 "` + { echo "$as_me:$LINENO: result: $POPPLER_LIBS" >&5 +echo "${ECHO_T}$POPPLER_LIBS" >&6; } + else + POPPLER_CFLAGS="" + POPPLER_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + POPPLER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "poppler >= 0.8.0 "` + echo $POPPLER_PKG_ERRORS + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + : + else + { { echo "$as_me:$LINENO: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 +echo "$as_me: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} + { (exit 1); exit 1; }; } + fi + + else + { echo "$as_me:$LINENO: result: internal" >&5 +echo "${ECHO_T}internal" >&6; } + SYSTEM_POPPLER=NO + BUILD_TYPE="$BUILD_TYPE XPDF" + fi + else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } @@ -25056,6 +25106,9 @@ echo "${ECHO_T}no" >&6; } fi + + + { echo "$as_me:$LINENO: checking whether to build the MediaWiki Editor extension" >&5 echo $ECHO_N "checking whether to build the MediaWiki Editor extension... $ECHO_C" >&6; } if test -n "$enable_mediawiki" -a "$enable_mediawiki" != "no" && test "$WITH_JAVA" != "no"; then @@ -27874,7 +27927,6 @@ PAM_LINK!$PAM_LINK$ac_delim CRYPT_LINK!$CRYPT_LINK$ac_delim GXX_INCLUDE_PATH!$GXX_INCLUDE_PATH$ac_delim MINGW_LIB_INCLUDE_PATH!$MINGW_LIB_INCLUDE_PATH$ac_delim -EXCEPTIONS!$EXCEPTIONS$ac_delim STLPORT4!$STLPORT4$ac_delim STLPORT_VER!$STLPORT_VER$ac_delim USE_SYSTEM_STL!$USE_SYSTEM_STL$ac_delim @@ -27948,6 +28000,7 @@ HSQLDB_JAR!$HSQLDB_JAR$ac_delim SYSTEM_BSH!$SYSTEM_BSH$ac_delim BSH_JAR!$BSH_JAR$ac_delim SERIALIZER_JAR!$SERIALIZER_JAR$ac_delim +SYSTEM_SAXON!$SYSTEM_SAXON$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -27989,7 +28042,6 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF -SYSTEM_SAXON!$SYSTEM_SAXON$ac_delim SAXON_JAR!$SAXON_JAR$ac_delim CURLCONFIG!$CURLCONFIG$ac_delim SYSTEM_CURL!$SYSTEM_CURL$ac_delim @@ -28086,6 +28138,7 @@ ENABLE_GTK!$ENABLE_GTK$ac_delim ENABLE_KDE!$ENABLE_KDE$ac_delim GCONF_CFLAGS!$GCONF_CFLAGS$ac_delim GCONF_LIBS!$GCONF_LIBS$ac_delim +ENABLE_GCONF!$ENABLE_GCONF$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -28127,7 +28180,6 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF -ENABLE_GCONF!$ENABLE_GCONF$ac_delim GNOMEVFS_CFLAGS!$GNOMEVFS_CFLAGS$ac_delim GNOMEVFS_LIBS!$GNOMEVFS_LIBS$ac_delim ENABLE_GNOMEVFS!$ENABLE_GNOMEVFS$ac_delim @@ -28147,7 +28199,10 @@ SYSTEM_CAIRO!$SYSTEM_CAIRO$ac_delim ENABLE_OPENGL!$ENABLE_OPENGL$ac_delim ENABLE_MINIMIZER!$ENABLE_MINIMIZER$ac_delim ENABLE_PRESENTER_SCREEN!$ENABLE_PRESENTER_SCREEN$ac_delim +POPPLER_CFLAGS!$POPPLER_CFLAGS$ac_delim +POPPLER_LIBS!$POPPLER_LIBS$ac_delim ENABLE_PDFIMPORT!$ENABLE_PDFIMPORT$ac_delim +SYSTEM_POPPLER!$SYSTEM_POPPLER$ac_delim ENABLE_MEDIAWIKI!$ENABLE_MEDIAWIKI$ac_delim SYSTEM_APACHE_COMMONS!$SYSTEM_APACHE_COMMONS$ac_delim COMMONS_CODEC_JAR!$COMMONS_CODEC_JAR$ac_delim @@ -28205,7 +28260,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 76; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 78; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/config_office/configure.in b/config_office/configure.in index fc1367e63e6c..fd57cebe7d67 100644 --- a/config_office/configure.in +++ b/config_office/configure.in @@ -345,6 +345,9 @@ AC_ARG_WITH(system-python, AC_ARG_WITH(system-icu, [ --with-system-icu Use icu already on system ],,) +AC_ARG_WITH(system-poppler, +[ --with-system-poppler Use poppler already on system +],,) AC_ARG_WITH(system-db, [ --with-system-db Use berkeley db already on system ],,) @@ -2163,27 +2166,6 @@ if test "$_os" = "OSF1"; then fi fi -dnl ************************************************************* -dnl Testing for exception handling - dwarf2 or sjlj exceptions... -dnl ************************************************************* -AC_MSG_CHECKING([exception type]) -AC_LANG_PUSH([C++]) -AC_CACHE_VAL(exceptions_type, [AC_TRY_LINK( - [#include <iostream> - -extern "C" void __sjthrow(void) __attribute__ ((__noreturn__)); - - ], - [__sjthrow() ], - [exceptions_type="sjlj"], - [exceptions_type="dwarf2"]) -]) - -AC_MSG_RESULT($exceptions_type) -AC_LANG_POP([C++]) -EXCEPTIONS="$exceptions_type" -AC_SUBST(EXCEPTIONS) - dnl ************************************************************** dnl Testing for required Solaris and SunStudio compiler patches... dnl ************************************************************** @@ -5338,13 +5320,31 @@ fi AC_MSG_CHECKING([whether to build the PDF Import extension]) if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then AC_MSG_RESULT([yes]) - BUILD_TYPE="$BUILD_TYPE XPDF" ENABLE_PDFIMPORT=YES + + dnl =================================================================== + dnl Check for system poppler + dnl =================================================================== + AC_MSG_CHECKING([which pdf backend to use]) + if test -n "$with_system_poppler" -o -n "$with_system_libs" && \ + test "$with_system_poppler" != "no"; then + AC_MSG_RESULT([external]) + SYSTEM_POPPLER=YES + PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 ) + else + AC_MSG_RESULT([internal]) + SYSTEM_POPPLER=NO + BUILD_TYPE="$BUILD_TYPE XPDF" + fi + else AC_MSG_RESULT([no]) ENABLE_PDFIMPORT=NO fi AC_SUBST(ENABLE_PDFIMPORT) +AC_SUBST(SYSTEM_POPPLER) +AC_SUBST(POPPLER_CFLAGS) +AC_SUBST(POPPLER_LIBS) AC_MSG_CHECKING([whether to build the MediaWiki Editor extension]) if test -n "$enable_mediawiki" -a "$enable_mediawiki" != "no" && test "$WITH_JAVA" != "no"; then diff --git a/config_office/set_soenv.in b/config_office/set_soenv.in index dd27dc9fa68f..be6237950916 100644 --- a/config_office/set_soenv.in +++ b/config_office/set_soenv.in @@ -62,7 +62,7 @@ my ( $CALL_CDECL, $COMMON_OUTDIR, $BMP_WRITES_FLAG, my ( $BIG_SVX, $COM, $ARCH, $CPU, $CPUNAME, $CVER, $GLIBC, $GUI, $GUIBASE, $GVER, $OS, $OSVERSION, $OUTPATH, $INPATH, $PATH_SEPERATOR, $DYNAMIC_CRT, $SET_EXCEPTIONS, $use_shl_versions, $CDPATHx, $JRELIBDIR, - $JREEXTRALIBDIR, $JRETOOLKITDIR, $JRETHREADDIR, $EXCEPTIONS, + $JREEXTRALIBDIR, $JRETOOLKITDIR, $JRETHREADDIR, $FLIPCMD ); # #------------------------------------------- @@ -144,7 +144,6 @@ if ( $MINGW eq "yes" ) else { $CC = PathFormat('@CC@'); # C compiler $CXX = PathFormat('@CXX@'); } # C++ compiler -$EXCEPTIONS = '@EXCEPTIONS@'; # Exception handling type $MOZILLA_VERSION = '@MOZILLA_VERSION@'; # mozilla version to use to build mozilla $MOZILLA_TOOLKIT = '@MOZILLA_TOOLKIT@'; # GUI toolkit to use to build mozilla $FLIPCMD = ""; # Flip '/' to '\' wrapper (only for winnt) @@ -1775,7 +1774,6 @@ ToFile( "GLIBC", $GLIBC, "e" ); ToFile( "GUIBASE", $GUIBASE, "e" ); ToFile( "GVER", $GVER, "e" ); ToFile( "OS", $OS, "e" ); -ToFile( "EXCEPTIONS", $EXCEPTIONS, "e" ); ToFile( "OSVERSION", $OSVERSION, "e" ); ToFile( "PTHREAD_CFLAGS", "@PTHREAD_CFLAGS@", "e" ); ToFile( "PTHREAD_LIBS", "@PTHREAD_LIBS@", "e" ); @@ -1947,6 +1945,9 @@ ToFile( "SYSTEM_GENCMN", "@SYSTEM_GENCMN@", "e" ); ToFile( "SYSTEM_JPEG", "@SYSTEM_JPEG@", "e" ); ToFile( "FREETYPE_CFLAGS", "@FREETYPE_CFLAGS@", "e" ); ToFile( "FREETYPE_LIBS", "@FREETYPE_LIBS@", "e" ); +ToFile( "SYSTEM_POPPLER", "@SYSTEM_POPPLER@", "e" ); +ToFile( "POPPLER_CFLAGS", "@POPPLER_CFLAGS@", "e" ); +ToFile( "POPPLER_LIBS", "@POPPLER_LIBS@", "e" ); ToFile( "SYSTEM_CAIRO", "@SYSTEM_CAIRO@", "e" ); ToFile( "CAIRO_CFLAGS", "@CAIRO_CFLAGS@", "e" ); ToFile( "CAIRO_LIBS", "@CAIRO_LIBS@", "e" ); diff --git a/soltools/giparser/gi_parse.cxx b/soltools/giparser/gi_parse.cxx index 71d2299be978..932958c63150 100644 --- a/soltools/giparser/gi_parse.cxx +++ b/soltools/giparser/gi_parse.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: gi_parse.cxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.16.1 $ * * This file is part of OpenOffice.org. * @@ -266,10 +266,10 @@ GenericInfo_Parser::ReadKey() { const char * pSearch = sCurParsePosition; - for ( ; *pSearch > 32; ++pSearch ); + for ( ; *pSearch > 32; ++pSearch ) ; UINT32 nKeyLength = pSearch - sCurParsePosition; - for ( ; *pSearch <= 32 && *pSearch > '\0'; ++pSearch ); + for ( ; *pSearch <= 32 && *pSearch > '\0'; ++pSearch ) ; pResult->AddKey( sCurParsePosition, nKeyLength, pSearch, strlen(pSearch), diff --git a/soltools/support/simstr.cxx b/soltools/support/simstr.cxx index c57efd671072..b691373c52d8 100644 --- a/soltools/support/simstr.cxx +++ b/soltools/support/simstr.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: simstr.cxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.16.1 $ * * This file is part of OpenOffice.org. * @@ -578,7 +578,7 @@ int Simstr::pos_first(char c) const { int i = 0; - for (i = 0; i < len ? sz[i] != c : false; i++); + for (i = 0; i < len ? sz[i] != c : false; i++) ; if (i >= len) return NO_POS; else @@ -592,7 +592,7 @@ Simstr::pos_first_after( char c, int i = 0; if (startSearchPos >= i) i = startSearchPos+1; - for (; i < len ? sz[i] != c : false; i++); + for (; i < len ? sz[i] != c : false; i++) ; if (i >= len) return NO_POS; else @@ -604,7 +604,7 @@ int Simstr::pos_last(char c) const { int i = 0; - for (i = len-1; i >= 0 ? sz[i] != c : false; i--); + for (i = len-1; i >= 0 ? sz[i] != c : false; i--) ; if (i < 0) return NO_POS; else @@ -655,7 +655,7 @@ Simstr::is_no_text() const return true; int i; - for (i = 0; sz[i] <= 32 && i < len; i++); + for (i = 0; sz[i] <= 32 && i < len; i++) ; if (i < len) return false; return true; |