summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-09-16 14:49:32 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-09-16 14:49:32 +0000
commit5436ce49f486322348ee564bcf8fed9ac52be648 (patch)
treeddd5c1dd144917427a8ea2bd6d4f58cf5767e810
parent799460dccff206acc35ea148b54d4da72387710e (diff)
CWS-TOOLING: integrate CWS cloph13
2009-09-01 #i104566# also use syslibroot/isysroot for external components 2009-08-28 #i104568# clean up duplicated definitions of OBJCXXFLAGS 2009-08-28 #i104567# add ccache-detection to configure (to skip to objcxx-flags) 2009-08-28 #i104566# use Mac OS X 10.4-SDK to ensure backwards compatibility use MACOSX_DEPLOYMENT_TARGET and sysroot/syslibroot switches ignore "-isysroot /Developer/..." arguments for OOo's cpp
-rwxr-xr-xconfigure174
-rw-r--r--configure.in58
-rw-r--r--set_soenv.in1
-rw-r--r--solenv/inc/unxmacx.mk23
-rw-r--r--soltools/cpp/_getopt.c10
5 files changed, 254 insertions, 12 deletions
diff --git a/configure b/configure
index fb0a81b31..411051764 100755
--- a/configure
+++ b/configure
@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS EGREP AWK SED LOCAL_SOLENV _solenv UPD SOURCEVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os GNUTAR OSVERSION PTHREAD_CFLAGS PTHREAD_LIBS ENABLE_CRASHDUMP VC_STANDARD ENABLE_WERROR ENABLE_DEBUG PRODUCT PROFULLSWITCH PROEXT ENABLE_SYMBOLS DISABLE_STRIP ENABLE_CUPS ENABLE_FONTCONFIG WITH_BINFILTER ENABLE_DIRECTX DISABLE_ACTIVEX DISABLE_ATL ENABLE_RPATH WITH_MYSPELL_DICTS SYSTEM_DICTS DICT_SYSTEM_DIR HYPH_SYSTEM_DIR THES_SYSTEM_DIR USE_SHELL WITH_MINGWIN SHELLPATH GCC_HOME CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COMPATH GCCVER HAVE_LD_BSYMBOLIC_FUNCTIONS ENABLE_PCH NO_HIDS GNUMAKE _cc HAVE_LD_HASH_STYLE PERL MSPDB_PATH COMEX USE_MINGW MIDL_PATH CSC_PATH FRAME_HOME CPP CXX CXXFLAGS ac_ct_CXX CXXCPP SIZEOF_LONG WORDS_BIGENDIAN LFS_CFLAGS ENABLE_VBA VBA_EXTENSION PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM PKGFORMAT RPM GPERF MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG BUILD_QADEVOOO SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN SYSTEM_ICU GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL SYSTEM_NEON NEON_VERSION ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB SYSTEM_MYTHES SYSTEM_LPSOLVE PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO ENABLE_OPENGL ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN POPPLER_CFLAGS POPPLER_LIBS ENABLE_PDFIMPORT SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_SERVLETAPI SERVLETAPI_JAR ENABLE_REPORTBUILDER SYSTEM_JFREEREPORT SAC_JAR LIBXML_JAR FLUTE_JAR JFREEREPORT_JAR LIBBASE_JAR LIBLAYOUT_JAR LIBLOADER_JAR LIBFORMULA_JAR LIBREPOSITORY_JAR LIBFONTS_JAR LIBSERIALIZER_JAR SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR COMMONS_LANG_JAR COMMONS_HTTPCLIENT_JAR COMMONS_LOGGING_JAR MOC KDE_CFLAGS KDE_LIBS MOC4 KDE4_CFLAGS KDE4_LIBS ENABLE_LOCKDOWN GOBJECT_CFLAGS GOBJECT_LIBS ENABLE_EVOAB2 ENABLE_KAB WITH_FONTOOO SYSTEM_MSPACK WITH_FONTS WITHOUT_PPDS WITHOUT_AFMS SCPDEFS USE_XINERAMA XINERAMA_LINK ANT ANT_HOME ANT_LIB WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS EGREP AWK SED LOCAL_SOLENV _solenv UPD SOURCEVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os GNUTAR OSVERSION PTHREAD_CFLAGS PTHREAD_LIBS ENABLE_CRASHDUMP VC_STANDARD ENABLE_WERROR ENABLE_DEBUG PRODUCT PROFULLSWITCH PROEXT ENABLE_SYMBOLS DISABLE_STRIP ENABLE_CUPS ENABLE_FONTCONFIG WITH_BINFILTER ENABLE_DIRECTX DISABLE_ACTIVEX DISABLE_ATL ENABLE_RPATH WITH_MYSPELL_DICTS SYSTEM_DICTS DICT_SYSTEM_DIR HYPH_SYSTEM_DIR THES_SYSTEM_DIR USE_SHELL WITH_MINGWIN SHELLPATH GCC_HOME CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COMPATH GCCVER HAVE_LD_BSYMBOLIC_FUNCTIONS ENABLE_PCH NO_HIDS GNUMAKE _cc HAVE_LD_HASH_STYLE PERL MSPDB_PATH COMEX USE_MINGW MIDL_PATH CSC_PATH FRAME_HOME CPP CXX CXXFLAGS ac_ct_CXX CXXCPP SIZEOF_LONG WORDS_BIGENDIAN LFS_CFLAGS ENABLE_VBA VBA_EXTENSION PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL USE_CCACHE CCACHE HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM PKGFORMAT RPM GPERF MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG BUILD_QADEVOOO SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN SYSTEM_ICU GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL SYSTEM_NEON NEON_VERSION ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB SYSTEM_MYTHES SYSTEM_LPSOLVE PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO ENABLE_OPENGL ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN POPPLER_CFLAGS POPPLER_LIBS ENABLE_PDFIMPORT SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_SERVLETAPI SERVLETAPI_JAR ENABLE_REPORTBUILDER SYSTEM_JFREEREPORT SAC_JAR LIBXML_JAR FLUTE_JAR JFREEREPORT_JAR LIBBASE_JAR LIBLAYOUT_JAR LIBLOADER_JAR LIBFORMULA_JAR LIBREPOSITORY_JAR LIBFONTS_JAR LIBSERIALIZER_JAR SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR COMMONS_LANG_JAR COMMONS_HTTPCLIENT_JAR COMMONS_LOGGING_JAR MOC KDE_CFLAGS KDE_LIBS MOC4 KDE4_CFLAGS KDE4_LIBS ENABLE_LOCKDOWN GOBJECT_CFLAGS GOBJECT_LIBS ENABLE_EVOAB2 ENABLE_KAB WITH_FONTOOO SYSTEM_MSPACK WITH_FONTS WITHOUT_PPDS WITHOUT_AFMS SCPDEFS USE_XINERAMA XINERAMA_LINK ANT ANT_HOME ANT_LIB WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -1038,6 +1038,14 @@ Optional Features:
Usage: --enable-check-only=yes
+ --enable-ccache-skip [default=auto] allow the use of --ccache-skip to
+ escape compiler flags that would otherwise prevent
+ caching of the result (currently used on Mac only)
+ NOTE: requires patched version because of a bug in
+ ccache (see issue 104567 for details and patch)
+ explicitly enable if your version of ccache doesn't
+ identify as version 2.4_OOo
+
--enable-sgistl for IRIX users, use this option option to build
OpenOffice.org using SGI's STL.
@@ -2798,6 +2806,13 @@ if test "${enable_check_only+set}" = set; then
enableval="$enable_check_only"
fi;
+# Check whether --enable-ccache-skip or --disable-ccache-skip was given.
+if test "${enable_ccache_skip+set}" = set; then
+ enableval="$enable_ccache_skip"
+
+else
+ enable_ccache_skip=auto
+fi;
# Check whether --with-lang or --without-lang was given.
if test "${with_lang+set}" = set; then
@@ -10050,6 +10065,161 @@ echo "${ECHO_T}no" >&6
fi
fi
+# ===================================================================
+# use --ccache-skip?
+# ===================================================================
+echo "$as_me:$LINENO: checking whether we are allowed and able to use --ccache-skip" >&5
+echo $ECHO_N "checking whether we are allowed and able to use --ccache-skip... $ECHO_C" >&6
+if test "$_os" != "Darwin" ; then
+ echo "$as_me:$LINENO: result: only used on Mac currently, skipping" >&5
+echo "${ECHO_T}only used on Mac currently, skipping" >&6
+elif test "$enable_ccache_skip" = "no" ; then
+ echo "$as_me:$LINENO: result: no - diabled explicitly" >&5
+echo "${ECHO_T}no - diabled explicitly" >&6
+elif test "$enable_ccache_skip" = "yes" ; then
+ echo "$as_me:$LINENO: result: yes - enabled explicitly, skipping checks" >&5
+echo "${ECHO_T}yes - enabled explicitly, skipping checks" >&6
+ USE_CCACHE=YES
+
+elif test "$enable_ccache_skip" = "auto" ; then
+ # checking for ccache presence/version
+ echo "$as_me:$LINENO: result: probing..." >&5
+echo "${ECHO_T}probing..." >&6
+ # Extract the first word of "ccache", so it can be a program name with args.
+set dummy ccache; 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_CCACHE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $CCACHE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CCACHE="$CCACHE" # 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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_CCACHE="$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
+
+ test -z "$ac_cv_path_CCACHE" && ac_cv_path_CCACHE="not_found"
+ ;;
+esac
+fi
+CCACHE=$ac_cv_path_CCACHE
+
+if test -n "$CCACHE"; then
+ echo "$as_me:$LINENO: result: $CCACHE" >&5
+echo "${ECHO_T}$CCACHE" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ if test "$CCACHE" = "not_found" ; then
+ { echo "$as_me:$LINENO: not enabling --ccache-skip (ccache not found)" >&5
+echo "$as_me: not enabling --ccache-skip (ccache not found)" >&6;}
+ else
+ # check ccache version
+ echo "$as_me:$LINENO: checking whether version of ccache is suitable" >&5
+echo $ECHO_N "checking whether version of ccache is suitable... $ECHO_C" >&6
+ CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
+ if test "$CCACHE_VERSION" = "2.4_OOo"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ echo "$as_me:$LINENO: checking whether ccache is actually used for the build" >&5
+echo $ECHO_N "checking whether ccache is actually used for the build... $ECHO_C" >&6
+ ac_ext=cc
+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
+
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 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); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ use_ccache=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+use_ccache=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $use_ccache = yes ; then
+ echo "$as_me:$LINENO: result: yes, will enable --ccache-skip" >&5
+echo "${ECHO_T}yes, will enable --ccache-skip" >&6
+ USE_CCACHE=YES
+
+ else
+ echo "$as_me:$LINENO: result: no, will not enable --ccache-skip" >&5
+echo "${ECHO_T}no, will not enable --ccache-skip" >&6
+ fi
+ CXXFLAGS=$save_CXXFLAGS
+ 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
+
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&5
+echo "$as_me: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&6;}
+ fi
+ fi
+else
+ { { echo "$as_me:$LINENO: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&5
+echo "$as_me: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
if test "$USE_SYSTEM_STL" = "YES"; then
echo "$as_me:$LINENO: checking if hash_map will be in __gnu_cxx namespace" >&5
echo $ECHO_N "checking if hash_map will be in __gnu_cxx namespace... $ECHO_C" >&6
@@ -28853,6 +29023,8 @@ s,@EXCEPTIONS@,$EXCEPTIONS,;t t
s,@STLPORT4@,$STLPORT4,;t t
s,@STLPORT_VER@,$STLPORT_VER,;t t
s,@USE_SYSTEM_STL@,$USE_SYSTEM_STL,;t t
+s,@USE_CCACHE@,$USE_CCACHE,;t t
+s,@CCACHE@,$CCACHE,;t t
s,@HAVE_GCC_VISIBILITY_FEATURE@,$HAVE_GCC_VISIBILITY_FEATURE,;t t
s,@ALLOC@,$ALLOC,;t t
s,@BUILD_VER_STRING@,$BUILD_VER_STRING,;t t
diff --git a/configure.in b/configure.in
index a417e8bc8..36c217986 100644
--- a/configure.in
+++ b/configure.in
@@ -676,6 +676,15 @@ AC_ARG_ENABLE(check-only,
Usage: --enable-check-only=yes
],,)
+AC_ARG_ENABLE(ccache-skip,
+[[ --enable-ccache-skip [default=auto] allow the use of --ccache-skip to
+ escape compiler flags that would otherwise prevent
+ caching of the result (currently used on Mac only)
+ NOTE: requires patched version because of a bug in
+ ccache (see issue 104567 for details and patch)
+ explicitly enable if your version of ccache doesn't
+ identify as version 2.4_OOo
+]],,enable_ccache_skip=auto)
AC_ARG_WITH(lang,
[ --with-lang Use this option to build OpenOffice.org with
additional language support. English (US) is always
@@ -2588,6 +2597,55 @@ if test "$GCC" = "yes"; then
fi
fi
+# ===================================================================
+# use --ccache-skip?
+# ===================================================================
+dnl used to escape compiler options for ccache that otherwise prevent
+dnl caching of the results (like "-x objective-c++" for Mac)
+AC_MSG_CHECKING([whether we are allowed and able to use --ccache-skip])
+if test "$_os" != "Darwin" ; then
+ AC_MSG_RESULT([only used on Mac currently, skipping])
+elif test "$enable_ccache_skip" = "no" ; then
+ AC_MSG_RESULT([no - diabled explicitly])
+elif test "$enable_ccache_skip" = "yes" ; then
+ AC_MSG_RESULT([yes - enabled explicitly, skipping checks])
+ AC_SUBST([USE_CCACHE], [YES])
+elif test "$enable_ccache_skip" = "auto" ; then
+ # checking for ccache presence/version
+ AC_MSG_RESULT([probing...])
+ AC_PATH_PROG([CCACHE],[ccache],[not_found])
+ if test "$CCACHE" = "not_found" ; then
+ AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)])
+ else
+ # check ccache version
+ AC_MSG_CHECKING([whether version of ccache is suitable])
+ CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
+ if test "$CCACHE_VERSION" = "2.4_OOo"; then
+ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([whether ccache is actually used for the build])
+ AC_LANG_PUSH([C++])
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
+ dnl an empty program will do, we're checking the compiler flags
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[]),
+ [use_ccache=yes], [use_ccache=no])
+ if test $use_ccache = yes ; then
+ AC_MSG_RESULT([yes, will enable --ccache-skip])
+ AC_SUBST([USE_CCACHE], [YES])
+ else
+ AC_MSG_RESULT([no, will not enable --ccache-skip])
+ fi
+ CXXFLAGS=$save_CXXFLAGS
+ AC_LANG_POP([C++])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip])
+ fi
+ fi
+else
+ AC_MSG_ERROR([invalid option to --enable-ccache-skip. Valid values are "auto", "yes" and "no"])
+fi
+
dnl ===================================================================
dnl system stl sanity tests
dnl ===================================================================
diff --git a/set_soenv.in b/set_soenv.in
index ed9603d9f..1a7fdc7d0 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1808,6 +1808,7 @@ ToFile( "HAVE_LD_HASH_STYLE","@HAVE_LD_HASH_STYLE@","e" );
ToFile( "HAVE_LD_BSYMBOLIC_FUNCTIONS",
"@HAVE_LD_BSYMBOLIC_FUNCTIONS@","e" );
ToFile( "CXX", $CXX, "e" );
+ToFile( "USE_CCACHE", "@USE_CCACHE@", "e" );
ToFile( "MINGWCXX", "@MINGWCXX@", "e" );
ToFile( "MINGWSTRIP", "@MINGWSTRIP@", "e" );
ToFile( "USE_SYSTEM_STL", "@USE_SYSTEM_STL@", "e" );
diff --git a/solenv/inc/unxmacx.mk b/solenv/inc/unxmacx.mk
index 3274b1d41..95f2aa76a 100644
--- a/solenv/inc/unxmacx.mk
+++ b/solenv/inc/unxmacx.mk
@@ -35,11 +35,6 @@
# PROCESSOR_DEFINES and DLLPOSTFIX are defined in the particular platform file
-# DARWIN_VERSION holds the Darwin version in the format: 000000. For example,
-# if the Darwin version is 1.3.7, DARWIN_VERSION will be set to 010307.
-# Not used now, comment it out. Remove it after some time.
-# DARWIN_VERSION=$(shell -/bin/sh -c "uname -r | sed 's/\./ /g' | xargs printf %2.2i%2.2i%2.2i")
-
ASM=
AFLAGS=
LINKOUTPUT_FILTER=
@@ -52,8 +47,15 @@ CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNO_PTHREAD_PRIORITY $(PROCESSOR_DEFI
CDEFS+=-DX_LOCALE
.ENDIF
.IF "$(GUIBASE)"=="aqua"
-# TODO: use MACOSX_DEPLOYMENT_TARGET instead of MAC_OS_X_VERSION_MIN_REQUIRED?
-CDEFS+=-DQUARTZ -DMAC_OS_X_VERSION_MIN_REQUIRED=1040
+# MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build,
+# build can assume functions/libraries of that version to be available
+# unless you want to do runtime checks for 10.5 api, you also want to use the 10.4 sdk
+# (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
+# http://developer.apple.com/technotes/tn2002/tn2064.html
+MACOSX_DEPLOYMENT_TARGET=10.4
+.EXPORT: MACOSX_DEPLOYMENT_TARGET
+CDEFS+=-DQUARTZ
+EXTRA_CDEFS+=-isysroot /Developer/SDKs/MacOSX10.4u.sdk
.ENDIF
# Name of library where static data members are initialized
@@ -104,7 +106,10 @@ CFLAGSCC=-pipe -fsigned-char -malign-natural $(ARCH_FLAGS)
# Normal Objective C compilation flags
#OBJCFLAGS=-no-precomp
OBJCFLAGS=-fobjc-exceptions
-OBJCXXFLAGS=-x objective-c++ -fobjc-exceptions
+# -x options generally ignored by ccache, tell it that it can cache
+# the result nevertheless
+CCACHE_SKIP:=$(eq,$(USE_CCACHE),YES --ccache-skip $(NULL))
+OBJCXXFLAGS:=$(CCACHE_SKIP) -x $(CCACHE_SKIP) objective-c++ -fobjc-exceptions
# Comp Flags for files that need exceptions enabled (C and C++)
CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
@@ -195,6 +200,8 @@ LINK*=$(CXX)
LINKC*=$(CC)
LINKFLAGSDEFS*=-Wl,-multiply_defined,suppress
+# assure backwards-compatibility
+EXTRA_LINKFLAGS+=-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
# Very long install_names are needed so that install_name_tool -change later on
# does not complain that "larger updated load commands do not fit:"
LINKFLAGSRUNPATH_URELIB=-install_name '@__________________________________________________URELIB/$(@:f)'
diff --git a/soltools/cpp/_getopt.c b/soltools/cpp/_getopt.c
index a27d0f296..3b1b18337 100644
--- a/soltools/cpp/_getopt.c
+++ b/soltools/cpp/_getopt.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include <stdio.h>
#include <string.h>
#define EPR fprintf(stderr,
@@ -21,11 +21,15 @@ int
if (optind >= argc ||
argv[optind][0] != '-' || argv[optind][1] == '\0')
return -1;
- else
- if (strcmp(argv[optind], "--") == 0)
+ else if (strcmp(argv[optind], "--") == 0)
{
optind++;
return -1;
+ }
+ else if (strcmp(argv[optind], "-isysroot") == 0)
+ {
+ // skip Mac OS X SDK selection flags
+ optind++; optind++;
}
}
optopt = c = argv[optind][sp];