Add a check to make sure that scilab is never linked against libstdc++
[scilab.git] / scilab / Makefile.in
index cb45cb5..3116fbf 100644 (file)
@@ -1935,7 +1935,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
 
 all-local: $(TARGETS_ALL)
 
-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
@@ -1947,6 +1947,13 @@ check-jvm-dep:
 @IS_MACOSX_FALSE@              echo "Found dependency from scilab-cli-bin to libjvm found"; exit 2;\
 @IS_MACOSX_FALSE@      fi
 
+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