Add a check to make sure that scilab is never linked against libstdc++
[scilab.git] / scilab / Makefile.am
index cc8e12c..73ba3f4 100644 (file)
@@ -149,7 +149,7 @@ $(top_builddir)/Version.incl
 valgrinddir=$(pkgdatadir)/tools/profiling
 valgrind_DATA = $(top_srcdir)/tools/profiling/valgrind.supp
 
-macros: $(top_builddir)/scilab-cli-bin $(top_builddir)/bin/scilab-cli check-jvm-dep
+macros: $(top_builddir)/scilab-cli-bin $(top_builddir)/bin/scilab-cli check-jvm-dep check-libstdcpp-dep
        -@( cd $(top_builddir) ; \
        echo "$(top_builddir)/bin/scilab-cli -ns -noatomsautoload -f modules/functions/scripts/buildmacros/buildmacros.sce" ; \
        $(top_builddir)/bin/scilab-cli -ns -noatomsautoload -f modules/functions/scripts/buildmacros/buildmacros.sce) || exit 1
@@ -164,6 +164,14 @@ if !IS_MACOSX
        fi
 endif
 
+
+check-libstdcpp-dep:
+# Check that scilab-cli does not have a dependency on libstdc++ (should be static)
+       @ldd .libs/scilab-bin .libs/scilab-cli-bin modules/.libs/libscilab*0 |grep libstdc++ > /dev/null; \
+       if test $$? == 0; then \
+               echo "Found dependency from scilab-cli-bin to libstdc++ found"; exit 2;\
+       fi
+
 # Build the public Javadoc (javasci v2 and Java/Scilab types)
 # This is not done in the module itself because its needs also the "types"
 # module