From: <mg...@us...> - 2008-02-10 06:36:47
|
Revision: 781 http://planeshift.svn.sourceforge.net/planeshift/?rev=781&view=rev Author: mgist Date: 2008-02-09 22:36:51 -0800 (Sat, 09 Feb 2008) Log Message: ----------- - Add static gcc linking check from CS. Modified Paths: -------------- trunk/configure.ac Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-02-09 16:37:21 UTC (rev 780) +++ trunk/configure.ac 2008-02-10 06:36:51 UTC (rev 781) @@ -281,6 +281,26 @@ [CS_HEADER_PROPERTY([CS_VISIBILITY_DEFAULT], [$cs_cv_prog_cxx_declare_visibility_default])]) +#------------------------------------------------------------------------------ +# Determine whether to link base g++ libraries statically +#------------------------------------------------------------------------------ +AC_MSG_CHECKING([whether to link base g++ libraries statically]) +AC_ARG_ENABLE([static-baselibs], [AC_HELP_STRING([--enable-static-baselibs], + [Link statically againts libgcc and libstdc++. Use with caution; enabling + this option may cause issues when dynamically linking against other C++ + modules. (default NO)])], + [], [enable_static_baselibs=no]) +AC_MSG_RESULT([$enable_static_baselibs]) +AS_IF([test $enable_static_baselibs = yes], + [CS_EMIT_BUILD_FLAGS([for -static-libgcc], + [cs_cv_prog_link_static_libgcc], [CS_CREATE_TUPLE([-static-libgcc])], + [C], [COMPILER.LFLAGS], [+]) + libstdcxx=`$CXX -print-file-name=libstdc++.a` + CS_EMIT_BUILD_FLAGS([for static libstdc++], + [cs_cv_prog_link_static_libstdcxx], + CS_CREATE_TUPLE([$libstdcxx]), + [C++], [COMPILER.LFLAGS], [+])]) + #---------------------------------------------------------------------------- # Check for Crystal Space (CS) #---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |