Kaydet (Commit) 072e89cf authored tarafından Rüdiger Timm's avatar Rüdiger Timm

INTEGRATION: CWS newportstl (1.237.2); FILE MERGED

2007/12/21 12:57:07 cmc 1.237.2.3: #i82715# detect a bad compiler
2007/12/21 12:36:26 cmc 1.237.2.2: #i82715# detect a bad compiler
2007/12/17 15:26:41 cmc 1.237.2.1: #i82715# default to using gcc stl for new (including x86_64) linux ports
üst 4e7d61a5
...@@ -3,7 +3,7 @@ dnl * vi:set sw=3 ts=3 et: ...@@ -3,7 +3,7 @@ dnl * vi:set sw=3 ts=3 et:
dnl * dnl *
dnl * Name: configure.in dnl * Name: configure.in
dnl * Auth: Willem van Dorp, Ross Nicholson, Oisin Boydell - Sun Microsystems Ireland dnl * Auth: Willem van Dorp, Ross Nicholson, Oisin Boydell - Sun Microsystems Ireland
dnl * Date: $Date: 2008-01-28 09:53:36 $ dnl * Date: $Date: 2008-01-29 13:12:38 $
dnl * dnl *
dnl * Desc: This file serves as input for the GNU autoconf package dnl * Desc: This file serves as input for the GNU autoconf package
dnl * in order to create a configure script. dnl * in order to create a configure script.
...@@ -12,7 +12,7 @@ dnl * necessary to build OpenOffice.org ...@@ -12,7 +12,7 @@ dnl * necessary to build OpenOffice.org
dnl * dnl *
dnl * dnl *
dnl ******************************************************************/ dnl ******************************************************************/
AC_REVISION( $Revision: 1.245 $ ) AC_REVISION( $Revision: 1.246 $ )
AC_PREREQ(2.50) AC_PREREQ(2.50)
AC_INIT() AC_INIT()
echo "$@" >config.parms echo "$@" >config.parms
...@@ -479,9 +479,10 @@ AC_ARG_WITH(stlport, ...@@ -479,9 +479,10 @@ AC_ARG_WITH(stlport,
Usage: --with-stlport=<absolute path to stlport home> Usage: --with-stlport=<absolute path to stlport home>
Warning!!, --without-stlport is possible with Warning!!, disabling using --without-stlport or
gcc >= 3.3.3, but will break ABI compatability enabling using --with-stlport on a platform that
], WITH_STLPORT=$withval , WITH_STLPORT=yes) defaults to the opposite will break ABI compatability
], WITH_STLPORT=$withval , WITH_STLPORT=auto)
AC_ARG_WITH(jdk-home, AC_ARG_WITH(jdk-home,
[ --with-jdk-home if you have installed JDK 1.3 or later on your system [ --with-jdk-home if you have installed JDK 1.3 or later on your system
please supply the path here. please supply the path here.
...@@ -2155,17 +2156,49 @@ if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then ...@@ -2155,17 +2156,49 @@ if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then
fi fi
else else
dnl ===================================================================
dnl Checks for what the default STL should be
dnl ===================================================================
AC_MSG_CHECKING([what the default STL should be])
DEFAULT_TO_STLPORT="yes"
if test "$_os" = "Linux"; then
case "$build_cpu" in
i?86|powerpc|sparc)
DEFAULT_TO_STLPORT="yes"
;;
*)
DEFAULT_TO_STLPORT="no"
;;
esac
fi
if test "$DEFAULT_TO_STLPORT" = "yes"; then
AC_MSG_RESULT([stlport])
else
AC_MSG_RESULT([gcc])
fi
if test "$WITH_STLPORT" = "auto"; then
WITH_STLPORT=$DEFAULT_TO_STLPORT
fi
dnl =================================================================== dnl ===================================================================
dnl Checks for STLPORT dnl Checks for STLPORT
dnl =================================================================== dnl ===================================================================
AC_MSG_CHECKING([for STLport headers]) AC_MSG_CHECKING([for STL providing headers])
STLPORT4="" STLPORT4=""
USE_SYSTEM_STL="" USE_SYSTEM_STL=""
if test "$WITH_STLPORT" = "yes"; then if test "$WITH_STLPORT" = "yes"; then
AC_MSG_RESULT([using internal stlport.]) AC_MSG_RESULT([using internal stlport.])
if test "$DEFAULT_TO_STLPORT" != "yes"; then
AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
echo "using stlport. Warning, breaks your ABI compatability!" >>warn
fi
elif test "$WITH_STLPORT" = "no"; then elif test "$WITH_STLPORT" = "no"; then
AC_MSG_RESULT([use system STL instead, Warning breaks your ABI compatability!]) AC_MSG_RESULT([using system STL])
USE_SYSTEM_STL="YES" USE_SYSTEM_STL="YES"
if test "$DEFAULT_TO_STLPORT" != "no"; then
AC_MSG_WARN([using system STL. Warning, breaks your ABI compatability!])
echo "using system STL. Warning, breaks your ABI compatability!" >>warn
fi
else else
STLPORT4=$WITH_STLPORT STLPORT4=$WITH_STLPORT
if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then
...@@ -2222,6 +2255,10 @@ dnl =================================================================== ...@@ -2222,6 +2255,10 @@ dnl ===================================================================
fi fi
fi fi
fi fi
if test "$DEFAULT_TO_STLPORT" != "yes"; then
AC_MSG_WARN([using stlport. Warning, breaks your ABI compatability!])
echo "using stlport. Warning, breaks your ABI compatability!" >>warn
fi
fi fi
fi fi
...@@ -2235,6 +2272,53 @@ AC_SUBST(STLPORT4) ...@@ -2235,6 +2272,53 @@ AC_SUBST(STLPORT4)
AC_SUBST(STLPORT_VER) AC_SUBST(STLPORT_VER)
AC_SUBST(USE_SYSTEM_STL) AC_SUBST(USE_SYSTEM_STL)
dnl ===================================================================
dnl system stl sanity tests
dnl ===================================================================
if test "$USE_SYSTEM_STL" = "YES"; then
AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
AC_LANG_PUSH([C++])
AC_TRY_COMPILE([#include <ext/hash_map>
using namespace __gnu_cxx;
],[hash_map<int, int> t; return 0;],
ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no)
if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
AC_MSG_ERROR([Can't find hash_map. Try with --with-stlport])
else
AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map])
fi
if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then
AC_MSG_CHECKING([if STL headers are visibility safe])
AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
AC_MSG_RESULT([$stlvisok])
if test "$stlvisok" = "no"; then
AC_MSG_ERROR([Your gcc STL headers are not visibility safe. Try with --with-stlport])
fi
sharedlink_ldflags_save=$LDFLAGS
LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared"
AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers])
AC_TRY_LINK([#include <sstream>
using namespace std;
],[istringstream strm( "test" ); return 0;],
gccvisok=yes, gccvisok=no)
LDFLAGS=$sharedlink_ldflags_save
AC_MSG_RESULT([$gccvisok])
if test "$gccvisok" = "no"; then
AC_MSG_ERROR([Your gcc is not -fvisibility-inlines-hidden safe. Try with --with-stlport])
fi
fi
AC_LANG_POP([C++])
fi
dnl =================================================================== dnl ===================================================================
dnl allocator dnl allocator
dnl =================================================================== dnl ===================================================================
...@@ -2258,24 +2342,6 @@ if test "$with_alloc" = "internal" -o -z "$with_alloc"; then ...@@ -2258,24 +2342,6 @@ if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
fi fi
AC_SUBST(ALLOC) AC_SUBST(ALLOC)
dnl ===================================================================
dnl hash_map hackery
dnl ===================================================================
if test "$USE_SYSTEM_STL" = "YES"; then
AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
AC_LANG_PUSH([C++])
AC_TRY_COMPILE([#include <ext/hash_map>
using namespace __gnu_cxx;
],[hash_map<int, int> t; return 0;],
ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no)
AC_LANG_POP([C++])
if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then
AC_MSG_ERROR([Can't find hash_map. Try with stlport enabled])
else
AC_MSG_RESULT([$ac_cv_cxx_have_ext_hash_map])
fi
fi
dnl =================================================================== dnl ===================================================================
dnl Custom build version dnl Custom build version
dnl =================================================================== dnl ===================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment