summaryrefslogtreecommitdiffstats
path: root/scilab/configure.ac
diff options
context:
space:
mode:
authorClément DAVID <clement.david@scilab-enterprises.com>2015-10-26 09:16:26 +0100
committerClément DAVID <clement.david@scilab-enterprises.com>2015-11-06 08:56:38 +0100
commit6bbe56ee16a93d6b5d34b2af9056fac575bc25e1 (patch)
treeb45602976b8f2011e086403b8d1ccefe99cc3c02 /scilab/configure.ac
parent079f209d5e9715440da2d0d5101906ea7b349e10 (diff)
downloadscilab-6bbe56ee16a93d6b5d34b2af9056fac575bc25e1.zip
scilab-6bbe56ee16a93d6b5d34b2af9056fac575bc25e1.tar.gz
Do not default to static linking for libstdc++
1. dlopen-ed C++ library might not work 2. People using older libstdc++ / glibc can easily preload a backported version at Scilab startup 3. The compilation chain now targets an old glibc / libstdc++ (RHEL 5) In depth, rationale : http://www.trilithium.com/johan/2005/06/static-libstdc/ Change-Id: I22b15d791e945a04879dc6f4737310f2849e960e
Diffstat (limited to 'scilab/configure.ac')
-rw-r--r--scilab/configure.ac54
1 files changed, 44 insertions, 10 deletions
diff --git a/scilab/configure.ac b/scilab/configure.ac
index d3dd9a6..dee43ac 100644
--- a/scilab/configure.ac
+++ b/scilab/configure.ac
@@ -1481,7 +1481,7 @@ if test "$with_openmp" != no; then
1481# AC_OPENMP 1481# AC_OPENMP
1482 OPENMP_CFLAGS="-fopenmp" 1482 OPENMP_CFLAGS="-fopenmp"
1483 OPENMP_CXXFLAGS="-fopenmp" 1483 OPENMP_CXXFLAGS="-fopenmp"
1484 OPENMP_LIBS="-lgomp -lstdc++" # Force -lstdc++ because some compilers do not add it automatically. 1484 OPENMP_LIBS="-lgomp"
1485 1485
1486 AC_CHECK_HEADERS([omp.h], [], 1486 AC_CHECK_HEADERS([omp.h], [],
1487 [AC_MSG_ERROR([Could not find omp.h])]) 1487 [AC_MSG_ERROR([Could not find omp.h])])
@@ -1849,9 +1849,6 @@ AC_SUBST(GRAPHICS_ENABLE)
1849LT_PREREQ([2.2.7]) 1849LT_PREREQ([2.2.7])
1850LT_INIT([shared dlopen disable-static]) 1850LT_INIT([shared dlopen disable-static])
1851 1851
1852# Eliminate -lstdc++ addition to postdeps for cross compiles.
1853postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
1854
1855# Avoid to link all the dep from others libraries (*.la included by LIBADD) 1852# Avoid to link all the dep from others libraries (*.la included by LIBADD)
1856link_all_deplibs=no 1853link_all_deplibs=no
1857 1854
@@ -1949,9 +1946,9 @@ fi
1949 1946
1950 1947
1951######### 1948#########
1952## Make sure that the libstdc++ and libgcc can be compiled as static 1949## Make sure that the libstdc++ libgcc and libgfortran can be compiled as
1950## static if requested
1953######### 1951#########
1954
1955AC_CHECK_STDCPP_STATIC() 1952AC_CHECK_STDCPP_STATIC()
1956 1953
1957################# 1954#################
@@ -1968,10 +1965,47 @@ if test "$enable_stop_on_warning" = yes; then
1968fi 1965fi
1969 1966
1970# SCI_*FLAGS contains all defaults values detected on configure 1967# SCI_*FLAGS contains all defaults values detected on configure
1971SCI_CFLAGS=$(echo $LARGEFILE_CFLAGS $CODECOVERAGE_CFLAGS $DEBUG_CFLAGS $ARCH_CFLAGS $COMPILER_CFLAGS $SCILIBS_CFLAGS $SSE_CFLAGS $BACKTRACE_CFLAGS $WARNING_CFLAGS) 1968SCI_CFLAGS=$(echo \
1972SCI_CXXFLAGS=$(echo $STDCXX_11_CXXFLAGS $LARGEFILE_CXXFLAGS $CODECOVERAGE_CXXFLAGS $DEBUG_CXXFLAGS $ARCH_CXXFLAGS $COMPILER_CXXFLAGS $SCILIBS_CXXFLAGS $SSE_CXXFLAGS $BACKTRACE_CXXFLAGS $WARNING_CXXFLAGS) 1969 $LARGEFILE_CFLAGS \
1973SCI_FFLAGS=$(echo $LARGEFILE_FFLAGS $CODECOVERAGE_FFLAGS $DEBUG_FFLAGS $ARCH_FFLAGS $COMPILER_FFLAGS $SCILIBS_FFLAGS $SSE_FFLAGS $BACKTRACE_FFLAGS $WARNING_FFLAGS) 1970 $CODECOVERAGE_CFLAGS \
1974SCI_LDFLAGS=$(echo $LARGEFILE_LDFLAGS $CODECOVERAGE_LDFLAGS $DEBUG_LDFLAGS $ARCH_LDFLAGS $COMPILER_LDFLAGS $SCILIBS_LDFLAGS $SSE_LDFLAGS $BACKTRACE_LDFLAGS $WARNING_LDFLAGS) 1971 $DEBUG_CFLAGS \
1972 $ARCH_CFLAGS \
1973 $COMPILER_CFLAGS \
1974 $SCILIBS_CFLAGS \
1975 $SSE_CFLAGS \
1976 $BACKTRACE_CFLAGS \
1977 $WARNING_CFLAGS )
1978SCI_CXXFLAGS=$(echo \
1979 $STDCXX_11_CXXFLAGS \
1980 $LARGEFILE_CXXFLAGS \
1981 $CODECOVERAGE_CXXFLAGS \
1982 $DEBUG_CXXFLAGS \
1983 $ARCH_CXXFLAGS \
1984 $COMPILER_CXXFLAGS \
1985 $SCILIBS_CXXFLAGS \
1986 $SSE_CXXFLAGS \
1987 $BACKTRACE_CXXFLAGS \
1988 $WARNING_CXXFLAGS )
1989SCI_FFLAGS=$(echo \
1990 $LARGEFILE_FFLAGS \
1991 $CODECOVERAGE_FFLAGS \
1992 $DEBUG_FFLAGS \
1993 $ARCH_FFLAGS \
1994 $COMPILER_FFLAGS \
1995 $SCILIBS_FFLAGS \
1996 $SSE_FFLAGS \
1997 $BACKTRACE_FFLAGS \
1998 $WARNING_FFLAGS )
1999SCI_LDFLAGS=$(echo \
2000 $LARGEFILE_LDFLAGS \
2001 $CODECOVERAGE_LDFLAGS \
2002 $DEBUG_LDFLAGS \
2003 $ARCH_LDFLAGS \
2004 $COMPILER_LDFLAGS \
2005 $SCILIBS_LDFLAGS \
2006 $SSE_LDFLAGS \
2007 $BACKTRACE_LDFLAGS \
2008 $WARNING_LDFLAGS )
1975AC_SUBST(SCI_CFLAGS) 2009AC_SUBST(SCI_CFLAGS)
1976AC_SUBST(SCI_CXXFLAGS) 2010AC_SUBST(SCI_CXXFLAGS)
1977AC_SUBST(SCI_FFLAGS) 2011AC_SUBST(SCI_FFLAGS)