Build STLport only as a compatibility library

This commit is contained in:
Fridrich Štrba 2011-02-09 04:21:48 +01:00
parent 053754d986
commit c296fe08de
4 changed files with 44 additions and 208 deletions

View file

@ -959,17 +959,10 @@ WITH_SYSTEM_MOZILLA=no)
AC_ARG_WITH(stlport,
AS_HELP_STRING([--with-stlport],
[The location that STLport is installed in. The STL header files are assumed
to be in stlport-home/stlport and the STLPort library in stlport-home/lib.])
[
Usage: --with-stlport=<abs. path to stlport home>
Warning!!, disabling using --without-stlport or
enabling using --with-stlport on a platform that
defaults to the opposite will break ABI compatability.
],
WITH_STLPORT=$withval ,
WITH_STLPORT=auto)
[Build the STLPort library for compatibility with old extensions for
architectures where STLPort used to be used.]),
with_stlport=$withval ,
with_stlport=auto)
AC_ARG_WITH(jdk-home,
AS_HELP_STRING([--with-jdk-home],
@ -2538,7 +2531,7 @@ dnl ===================================================================
dnl Set the gcc/gxx include directories
dnl ===================================================================
# Removed the special FreeBSD treatment. The problem was that with_gxx_include_path
# often contains an i386 which is expanded as a macro. Solved in stlport.
# often contains an i386 which is expanded as a macro.
if test "$GXX" = "yes"; then
AC_MSG_CHECKING([for g++ include path])
if test -z "$with_gxx_include_path"; then
@ -2813,118 +2806,53 @@ fi
dnl ===================================================================
dnl Checks for what the default STL should be
dnl ===================================================================
AC_MSG_CHECKING([what the default STL should be])
DEFAULT_TO_STLPORT="no"
AC_MSG_CHECKING([Whether building STLPort library makes sense])
BUILD_STLPORT="no"
if test "$_os" = "Linux"; then
case "$host_cpu" in
i?86)
case "$host_os" in k*bsd*-gnu*)
DEFAULT_TO_STLPORT="no"
BUILD_STLPORT="no"
;;
*)
DEFAULT_TO_STLPORT="yes"
BUILD_STLPORT="yes"
;;
esac
;;
*)
DEFAULT_TO_STLPORT="no"
BUILD_STLPORT="no"
;;
esac
elif test "$_os" = "SunOS"; then
DEFAULT_TO_STLPORT="yes"
BUILD_STLPORT="yes"
elif test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
DEFAULT_TO_STLPORT="yes"
BUILD_STLPORT="yes"
elif test "$_os" = "OS2"; then
DEFAULT_TO_STLPORT="yes"
BUILD_STLPORT="yes"
elif test "$_os" = "FreeBSD"; then
DEFAULT_TO_STLPORT="yes"
BUILD_STLPORT="yes"
fi
if test "$DEFAULT_TO_STLPORT" = "yes"; then
AC_MSG_RESULT([stlport])
if test "$BUILD_STLPORT" = "yes" ; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([system])
fi
if test "$WITH_STLPORT" = "auto"; then
WITH_STLPORT=$DEFAULT_TO_STLPORT
AC_MSG_RESULT([no])
fi
dnl ===================================================================
dnl Checks for STLPORT
dnl ===================================================================
AC_MSG_CHECKING([for STL providing headers])
STLPORT4=""
USE_SYSTEM_STL=""
if test "$WITH_STLPORT" = "yes"; then
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
AC_MSG_RESULT([using system STL])
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
AC_MSG_CHECKING([Whether STLPort library will be actually built])
if test "$with_stlport" = "auto" -o "$BUILD_STLPORT" = "no"; then
with_stlport=$BUILD_STLPORT
fi
if test "$with_stlport" = "yes" ; then
AC_MSG_RESULT([yes])
WITH_STLPORT=YES
SCPDEFS+=-DWITH_STLPORT
BUILD_TYPE="$BUILD_TYPE STLPORT"
else
STLPORT4=$WITH_STLPORT
if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
AC_TRY_CPP($STLPORT4/stlport/hash_map, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([STLport headers not found.]))
else
dnl AC_TRY_CPP doesn't work for MSVC because C++ preprocessor is not found by autoconf.
if test -f "$STLPORT4/stlport/hash_map"; then
AC_MSG_RESULT([checked.])
else
AC_MSG_ERROR([STLport headers not found.])
fi
fi
if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
AC_MSG_CHECKING([for STLport libraries])
if test "$_os" = "SunOS"; then
if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then
AC_MSG_RESULT([checked])
elif test -f "$STLPORT4/lib/libstlport.so"; then
AC_MSG_RESULT([checked])
STLPORT_VER=500
else
AC_MSG_ERROR([STLport libraries not found])
fi
elif test "$_os" = "Darwin"; then
if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then
AC_MSG_RESULT([checked])
elif test -f "$STLPORT4/lib/libstlport.dylib"; then
AC_MSG_RESULT([checked])
STLPORT_VER=500
else
AC_MSG_ERROR([STLport libraries not found])
fi
else
if test -f "$STLPORT4/lib/libstlport_gcc.so"; then
AC_MSG_RESULT([checked])
elif test -f "$STLPORT4/lib/libstlport.so"; then
AC_MSG_RESULT([checked])
STLPORT_VER=500
else
AC_MSG_ERROR([STLport libraries not found])
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
WITH_STLPORT=NO
AC_MSG_RESULT([no])
fi
if test -z "$STLPORT4"; then
STLPORT4="NO_STLPORT4"
fi
if test -z "$STLPORT_VER"; then
STLPORT_VER=400
fi
AC_SUBST(STLPORT4)
AC_SUBST(STLPORT_VER)
AC_SUBST(USE_SYSTEM_STL)
AC_SUBST(WITH_STLPORT)
dnl ===================================================================
dnl visibility and c++0x features
@ -3036,21 +2964,10 @@ dnl ===================================================================
dnl system stl sanity tests
dnl ===================================================================
HAVE_GCC_VISIBILITY_BROKEN=
if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) -a "$USE_SYSTEM_STL" = "YES"; then
AC_MSG_CHECKING([if hash_map will be in __gnu_cxx namespace])
if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) ; then
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)
@ -4862,15 +4779,12 @@ if test -n "$with_system_mdds" -o -n "$with_system_headers" && \
dnl Determine which hash container mdds shall use
dnl ===================================================================
AC_MSG_CHECKING([which hash container mdds shall use])
if test "x$HAVE_BOOST_UNORDERED_MAP" = "xTRUE"; then
MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
AC_MSG_RESULT([boost::unordered_map])
elif test "x$HAVE_CXX0X" = "xTRUE"; then
if test "x$HAVE_CXX0X" = "xTRUE"; then
MDDS_CPPFLAGS="-std=c++0x"
AC_MSG_RESULT([std::unordered_map])
else
MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_STLPORT"
AC_MSG_RESULT([std::hash_map])
MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST"
AC_MSG_RESULT([boost::unordered_map])
fi
AC_LANG_PUSH([C++])

View file

@ -40,7 +40,7 @@ my ( $outfile, $bootfile, $newline, $comment,
$compiler, $ds, $ps,
$wps, $cur_dir, $par_dir, $I, $L, $tmp, $MINGW,
$USE_MINGW, $platform,
$cygwinver, $empty, $no_ant, $no_stl, $no_gcc_include,
$cygwinver, $empty, $no_ant, $no_gcc_include,
$no_gxx_include, $warnfile, $Warning, $result, $unsetvars, $exportvars, $win_format_var, $perl_os, @mingw_lib_include_paths, $mingw_lib_include_path);
#
#-------------------------------------------------
@ -71,8 +71,7 @@ my ( $BIG_SVX, $COM, $ARCH, $CPU, $CPUNAME, $CVER, $GLIBC, $GUI, $GUIBASE,
my ( $USR, $ETC, $BIN, $LIB, $LIB64, $INC, $INCLUDE, $DEV, $OPT, $LOCAL, $SOLENV, $SOLVER, $CONFIG, $DEFIMGS,
$USR_BIN, $USR_LIB, $USR_LOCAL, $USR_CCS, $JAVA_BIN, $JAVA_LIB, $JAVA_INCLUDE,
$SOLARENVINC, $USR_DT, $USR_OPENWIN, $XLIB, $XINC,
$CYGWIN_PATH, $language, $dict, $ASM_PATH, $NSIS_PATH, $ps_STLPORT_LIB, $L_STLPORT_LIB,
$STLPORT_stlport, $STLPORT_inc_stlport, $PERL_PATH, $CL_X64 );
$CYGWIN_PATH, $language, $dict, $ASM_PATH, $NSIS_PATH, $PERL_PATH, $CL_X64 );
# Environment variables.
my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $JAVAFLAGS, $OOO_SHELL,
@ -86,7 +85,7 @@ my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $JAVAFLAGS, $OOO_SHELL,
$COMP_ENV, $ILIB, $JAVAHOME, $PSDK_HOME, $DIRECTXSDK_LIB, $USE_NEW_SDK, $FRAME_HOME,
$USE_DIRECTX5, $ATL_LIB, $ATL_INCLUDE, $MFC_LIB, $MFC_INCLUDE, $NO_HIDS, $TMPDIR,
$COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS,
$WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $MOZILLA_VERSION, $MOZILLA_TOOLKIT, $PREBUILD_MOZAB, $MOZILLABUILD,
$WIN_GNUCOPY, $WIN_TOUCH, $MOZILLA_VERSION, $MOZILLA_TOOLKIT, $PREBUILD_MOZAB, $MOZILLABUILD,
$PROEXT, $TARFILE_LOCATION,
$PYTHON, $SYSTEM_PYTHON, $SYSTEM_MOZILLA, $EPM_FLAGS);
#
@ -116,10 +115,8 @@ $par_dir = ".."; # parrent directory
$I = " -I"; # include search path
$L = " -L"; # library search path
$empty = ""; # used as argument
$no_stl = "NO_STLPORT4"; # possible argument
$warnfile = "warn"; # logfile configure warnings.
$Warning = ""; # container for warning messages
$STLPORT4 = '@STLPORT4@'; # Location of STLport4
$SYSTEM_PYTHON = '@SYSTEM_PYTHON@';
if ($SYSTEM_PYTHON eq "NO") {
$PYTHON = "python";
@ -869,11 +866,6 @@ if ( $platform =~ m/cygwin|os2/ ) {
# 3. bash path.
$OOO_SHELL = '@BASH@';
if ( '@STLPORT4@' eq $no_stl )
{
$STLPORT4 = "$no_stl";
}
# ml.exe assembler path for Windows users.
if ($platform =~ m/cygwin/)
{ $ASM_PATH = PathFormat('@ASM_HOME@');
@ -947,19 +939,6 @@ $USR_OPENWIN = $USR.$ds."openwin";
$USR_DT = $USR.$ds."dt";
$COMMON_BUILD_TOOLS = '$SRC_ROOT'.$ds."external".$ds."common";
if ($STLPORT4 ne $no_stl) {
$ps_STLPORT_LIB = $ps.'$STLPORT4'.$LIB64;
$L_STLPORT_LIB = $L.'$STLPORT4'.$LIB64;
$STLPORT_stlport = $I.'$STLPORT4'.$ds.'stlport';
$STLPORT_inc_stlport = $I.'$STLPORT4'.$ds.'include'.$ds.'stlport';
} else {
$ps_STLPORT_LIB = "";
$L_STLPORT_LIB = "";
$STLPORT_stlport = $I.$SRC_ROOT.$SOLVER.$ds.$UPD.$ds.$INPATH.$INC.$ds."stl";
$STLPORT_inc_stlport = "";
}
# Windows NT only variables
if ($platform =~ m/cygwin/)
{
@ -1092,10 +1071,6 @@ if ($platform =~ m/cygwin|os2/)
$ILIB = $cur_dir;
if ($STLPORT4 ne $no_stl) {
$ILIB .= $wps.$STLPORT4.$LIB64;
}
# Mingw is different
if ( $COM eq "MSC" )
{ $ILIB .= $wps.$SOLARVER.$ds.$INPATH.$LIB;
@ -1249,7 +1224,6 @@ elsif ($platform =~ m/cygwin/)
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
$PATH .= $ps.$tmppath;
}
$PATH .= $ps_STLPORT_LIB;
# nsis path for Windows users.
$NSIS_PATH = PathFormat('@NSIS_PATH@');
$tmppath = CygFormat($NSIS_PATH);
@ -1361,7 +1335,6 @@ if ($platform =~ m/solaris/)
$L.$JRELIBDIR.
$L.$JRETOOLKITDIR.
$L.$JRETHREADDIR.
$L_STLPORT_LIB.
$L.$XLIB;
}
elsif ($platform =~ m/linux|netbsd|osf1|aix|freebsd|openbsd/)
@ -1375,8 +1348,7 @@ elsif ($platform =~ m/linux|netbsd|osf1|aix|freebsd|openbsd/)
$SOLARLIB .= $L.'$JAVA_HOME'.$LIB64.
$L.$JRELIBDIR.
$L.$JRETOOLKITDIR.
$L.$JRETHREADDIR.
$L_STLPORT_LIB;
$L.$JRETHREADDIR;
if ( $XLIB ne "/usr/lib" && $XLIB ne "/usr/lib64" ) {
$SOLARLIB .= $L.$XLIB;
@ -1385,12 +1357,10 @@ elsif ($platform =~ m/linux|netbsd|osf1|aix|freebsd|openbsd/)
elsif ($platform =~ m/cygwin|os2/)
{ $SOLARLIB = $L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
$L.$par_dir.$LIB.
$L_STLPORT_LIB.
$L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB;
}
elsif ($platform =~ m/darwin/)
{ $SOLARLIB = $L.'$SOLARVER'.$ds.'$INPATH'.$LIB.
$L_STLPORT_LIB.
$L.$USR_LIB;
# [ed] 6/15/02 Add in X11 libraries onto the library path
if ($GUIBASE eq "unx") {
@ -1415,12 +1385,6 @@ $SOLARINC = $I.$cur_dir.
if ($platform =~ m/solaris|linux|osf1|freebsd|netbsd|aix|openbsd/)
{
$SOLARINC .= $STLPORT_stlport;
if ($platform =~ m/linux|freebsd|netbsd|openbsd/)
{
# This simply adds an include path, so even cases that break the FHS work
$SOLARINC .= $STLPORT_inc_stlport;
}
if ($platform =~ m/solaris/ && ! $CC =~ "gcc")
{
$SOLARINC .= '/SC5 ';
@ -1430,12 +1394,6 @@ if ($platform =~ m/solaris/)
{
$SOLARINC .= $I.$COMPATH.$INCLUDE;
}
if ($platform =~ m/linux/)
{
# This simply adds an include path, so even cases that break the FHS work
$SOLARINC .= $STLPORT_inc_stlport;
}
$SOLARINC .= $I.'$SOLARENV'.$INC.$ds."Xp31";
@ -1486,8 +1444,7 @@ if ($platform =~ m/linux/)
}
}
elsif ($platform =~ m/cygwin/)
{ $SOLARINC .= $STLPORT_stlport;
if ($JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME")
{ if ($JAVA_HOME ne "" && $JAVA_HOME ne "NO_JAVA_HOME")
{ $SOLARINC .= $I.'$JAVA_HOME'.$INCLUDE.$ds."win32".
$I.'$JAVA_HOME'.$INCLUDE;
}
@ -1524,8 +1481,7 @@ elsif ($platform =~ m/cygwin/)
}
}
elsif ($platform =~ m/darwin/)
{ $SOLARINC .= $STLPORT_stlport.
$I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Versions".$ds."Current".$ds."Headers".
{ $SOLARINC .= $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Versions".$ds."Current".$ds."Headers".
$I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers";
# [ed] 6/15/02 Add in X11 headers as appropriate for the build
if ($GUIBASE eq "unx") {
@ -1573,8 +1529,6 @@ ToFile( "ANT_HOME", PathFormat("@ANT_HOME@"), "e" );
ToFile( "ANT_LIB", PathFormat("@ANT_LIB@"), "e" );
ToFile( "ANT", PathFormat("@ANT@"), "e" );
ToFile( "JDKLIB", $JAVA_LIB, "e" );
ToFile( "STLPORT4", $STLPORT4, "e" );
ToFile( "STLPORT_VER", "@STLPORT_VER@", "e" );
ToFile( "ASM_PATH", $ASM_PATH, "e" );
ToFile( "BUILD_SOSL", $BUILD_SOSL, "e" );
ToFile( "FRAMEWORKSHOME", $FRAMEWORKSHOME, "e" );
@ -1842,7 +1796,7 @@ 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" );
ToFile( "WITH_STLPORT", "@WITH_STLPORT@", "e" );
ToFile( "ALLOC", "@ALLOC@", "e" );
ToFile( "ENABLE_SYMBOLS", "@ENABLE_SYMBOLS@", "e" );
ToFile( "DISABLE_STRIP", "@DISABLE_STRIP@", "e" );

View file

@ -34,12 +34,12 @@ TARGET=so_stlport
.INCLUDE : settings.mk
.IF "$(USE_SYSTEM_STL)"=="YES"
.IF "$(WITH_STLPORT)"!="YES"
all:
@echo "Nothing to do"
.ELSE # "$(USE_SYSTEM_STL)"
.ELSE # "$(WITH_STLPORT)"!="YES"
# --- Files --------------------------------------------------------
.EXPORT : CC CXX
@ -188,16 +188,6 @@ OUT2LIB= \
# --- Targets ------------------------------------------------------
.IF "$(STLPORT4)"!="NO_STLPORT4"
all :
@echo " An already available installation of STLport has been chosen in the configure process."
@echo " Therefore the version provided here does not need to be built in addition."
.ELIF "$(OS)"=="MACOSX"
all:
@echo '--with-stlport=yes is not supported on Mac OS X'
false
.ENDIF
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
.INCLUDE : tg_ext.mk
@ -229,4 +219,4 @@ $(PACKAGE_DIR)$/$(CONFIGURE_FLAG_FILE) : $(PACKAGE_DIR)$/win32_sdk_patch
.ENDIF "$(COM)"=="GCC"
.ENDIF # "$(GUI)"=="WNT"
.ENDIF # "$(USE_SYSTEM_STL)"
.ENDIF # "$(WITH_STLPORT)"!="YES"

View file

@ -1,25 +1,3 @@
mkdir: %_DEST%\inc%_EXT%\stl
mkdir: %_DEST%\inc%_EXT%\stl\stl
mkdir: %_DEST%\inc%_EXT%\stl\stl\debug
mkdir: %_DEST%\inc%_EXT%\stl\stl\wrappers
mkdir: %_DEST%\inc%_EXT%\stl\config
mkdir: %_DEST%\inc%_EXT%\stl\using
mkdir: %_DEST%\inc%_EXT%\stl\using\h
mkdir: %_DEST%\inc%_EXT%\stl\wrap_std
mkdir: %_DEST%\inc%_EXT%\stl\wrap_std\h
..\%__SRC%\inc\*.SUNWCCH %_DEST%\inc%_EXT%\stl\*
..\%__SRC%\inc\stlport\* %_DEST%\inc%_EXT%\stl\*
..\%__SRC%\inc\stlport\stl\* %_DEST%\inc%_EXT%\stl\stl\*
..\%__SRC%\inc\stlport\stl\debug\* %_DEST%\inc%_EXT%\stl\stl\debug\*
..\%__SRC%\inc\stlport\stl\wrappers\* %_DEST%\inc%_EXT%\stl\stl\wrappers\*
..\%__SRC%\inc\stlport\config\* %_DEST%\inc%_EXT%\stl\config\*
..\%__SRC%\inc\stlport\using\* %_DEST%\inc%_EXT%\stl\using\*
..\%__SRC%\inc\stlport\using\h\* %_DEST%\inc%_EXT%\stl\using\h\*
..\%__SRC%\inc\stlport\wrap_std\* %_DEST%\inc%_EXT%\stl\wrap_std\*
..\%__SRC%\inc\stlport\wrap_std\h\* %_DEST%\inc%_EXT%\stl\wrap_std\h\*
..\systemstlguards\*.h %_DEST%\inc%_EXT%\stl\*.h
..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so
..\%__SRC%\lib\lib*.a %_DEST%\lib%_EXT%\lib*.a
..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT%\*.lib
..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll